Parcourir la source

qcacmn: Add qdf_must_check function attribute

Some compilers allow functions to be annotated such that a warning will
be emitted if the return value of that function is not used. Allow the
WLAN driver to leverage these annotations by introducing a wrapper in
QDF, qdf_must_check.

Change-Id: I9c1328ae904857717703aae3748b207967a8dd3d
CRs-Fixed: 2382837
Dustin Brown il y a 6 ans
Parent
commit
631cde9525
2 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 2 1
      qdf/inc/qdf_types.h
  2. 3 1
      qdf/linux/src/i_qdf_types.h

+ 2 - 1
qdf/inc/qdf_types.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -30,6 +30,7 @@
 #endif
 #endif
 
+#define qdf_must_check __qdf_must_check
 
 /* Include Files */
 #include <i_qdf_types.h>

+ 3 - 1
qdf/linux/src/i_qdf_types.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -62,6 +62,8 @@
 #include <linux/ipa.h>
 #endif
 
+#define __qdf_must_check __must_check
+
 typedef struct sg_table __sgtable_t;
 
 /*