diff mbox

ARM: bcm2835: remove unused __packet

Message ID 1465321773-21519-1-git-send-email-ben.dooks@codethink.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Dooks June 7, 2016, 5:49 p.m. UTC
The driver defines a variable called __packet but then never
uses it, and does not export it for others to use either. Fix
the warning about undeclared variable by removing it.

drivers/soc/bcm/raspberrypi-power.c:48:3: warning: symbol '__packet' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Eric Anholt <eric@anholt.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Alexander Aring <alex.aring@gmail.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/soc/bcm/raspberrypi-power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Anholt June 7, 2016, 8:30 p.m. UTC | #1
Ben Dooks <ben.dooks@codethink.co.uk> writes:

> The driver defines a variable called __packet but then never
> uses it, and does not export it for others to use either. Fix
> the warning about undeclared variable by removing it.
>
> drivers/soc/bcm/raspberrypi-power.c:48:3: warning: symbol '__packet' was not declared. Should it be static?

Reviewed-by: Eric Anholt <eric@anholt.net>

PM folks: I'd be happy to see this go through your trees, but either way
is fine with me.
Kevin Hilman June 10, 2016, 10:11 p.m. UTC | #2
Eric Anholt <eric@anholt.net> writes:

> Ben Dooks <ben.dooks@codethink.co.uk> writes:
>
>> The driver defines a variable called __packet but then never
>> uses it, and does not export it for others to use either. Fix
>> the warning about undeclared variable by removing it.
>>
>> drivers/soc/bcm/raspberrypi-power.c:48:3: warning: symbol '__packet' was not declared. Should it be static?
>
> Reviewed-by: Eric Anholt <eric@anholt.net>
>
> PM folks: I'd be happy to see this go through your trees, but either way
> is fine with me.

Since this is in drivers/soc, just include it in your cleanup branch for
arm-soc.

Kevin
Arnd Bergmann June 13, 2016, 3:55 p.m. UTC | #3
On Tuesday, June 7, 2016 6:49:33 PM CEST Ben Dooks wrote:
> The driver defines a variable called __packet but then never
> uses it, and does not export it for others to use either. Fix
> the warning about undeclared variable by removing it.
> 
> drivers/soc/bcm/raspberrypi-power.c:48:3: warning: symbol '__packet' was not declared. Should it be static?
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---

The patch looks good, but it's probably worth mentioning here that
this was intended to be the '__packed' attribute instead of a local
variable. The attribute is useless here, as the variables both
still get the default stack alignment, even if rpi_firmware_property
only requires byte-aligned data.

	Arnd

> diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/soc/bcm/raspberrypi-power.c
> index fe96a8b..f7ed118 100644
> --- a/drivers/soc/bcm/raspberrypi-power.c
> +++ b/drivers/soc/bcm/raspberrypi-power.c
> @@ -45,7 +45,7 @@ struct rpi_power_domains {
>  struct rpi_power_domain_packet {
>         u32 domain;
>         u32 on;
> -} __packet;
> +};
>
diff mbox

Patch

diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/soc/bcm/raspberrypi-power.c
index fe96a8b..f7ed118 100644
--- a/drivers/soc/bcm/raspberrypi-power.c
+++ b/drivers/soc/bcm/raspberrypi-power.c
@@ -45,7 +45,7 @@  struct rpi_power_domains {
 struct rpi_power_domain_packet {
 	u32 domain;
 	u32 on;
-} __packet;
+};
 
 /*
  * Asks the firmware to enable or disable power on a specific power