Skip to content

Commit d2af686

Browse files
rddunlapdavem330
authored andcommitted
connector: fix defined but not used warning
Fix a build warning in connector.c when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused. ../drivers/connector/connector.c:242:12: warning: 'cn_proc_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 005c1c0 commit d2af686

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/connector/connector.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2020
*/
2121

22+
#include <linux/compiler.h>
2223
#include <linux/kernel.h>
2324
#include <linux/module.h>
2425
#include <linux/list.h>
@@ -239,7 +240,7 @@ void cn_del_callback(struct cb_id *id)
239240
}
240241
EXPORT_SYMBOL_GPL(cn_del_callback);
241242

242-
static int cn_proc_show(struct seq_file *m, void *v)
243+
static int __maybe_unused cn_proc_show(struct seq_file *m, void *v)
243244
{
244245
struct cn_queue_dev *dev = cdev.cbdev;
245246
struct cn_callback_entry *cbq;

0 commit comments

Comments
 (0)