Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754266Ab2FRJEo (ORCPT ); Mon, 18 Jun 2012 05:04:44 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49510 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484Ab2FRJEn (ORCPT ); Mon, 18 Jun 2012 05:04:43 -0400 Date: Mon, 18 Jun 2012 11:04:40 +0200 Message-ID: From: Takashi Iwai To: Randy Dunlap Cc: Geert Uytterhoeven , linux-kernel@vger.kernel.org, Andrew Morton , David Airlie Subject: Re: [PATCH] vga_switcheroo.h: fix pci_dev warning In-Reply-To: <4FDB9109.7070001@xenotime.net> References: <1339320244-22792-1-git-send-email-geert@linux-m68k.org> <4FDB9109.7070001@xenotime.net> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1760 Lines: 61 At Fri, 15 Jun 2012 12:46:17 -0700, Randy Dunlap wrote: > > From: Randy Dunlap > > Fix warnings on some architectures/configs (not on x86): > > include/linux/vga_switcheroo.h:28:30: warning: 'struct pci_dev' declared inside parameter list [enabled by default] > include/linux/vga_switcheroo.h:28:30: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] > > Signed-off-by: Randy Dunlap > Cc: Takashi Iwai Acked-by: Takashi Iwai And while we are at it, another trivial fix I stumbled on. thanks, Takashi --- From: Takashi Iwai Subject: [PATCH] vga_switcheroo: Avoid double inclusion Add a proper ifndef thingy to protect from the double inclusion. Signed-off-by: Takashi Iwai --- include/linux/vga_switcheroo.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index 60da41f..539acd3 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h @@ -7,6 +7,9 @@ * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs */ +#ifndef _LINUX_VGA_SWITCHEROO_H +#define _LINUX_VGA_SWITCHEROO_H + #include enum vga_switcheroo_state { @@ -71,3 +74,5 @@ static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return #endif + +#endif /* _LINUX_VGA_SWITCHEROO_H */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/