Re: [PATCH] usb: includes: search and replace __attribute__ ((packed))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 10, 2011 at 02:00:58PM +0200, Felipe Balbi wrote:
> checkpatch.pl prefers us to use __packed instead
> of the more lengthy __attribute__ ((packed)), so
> a simple search and replace fixed all occurrences
> on all USB headers.
> 
> This patch was conceived with the following:
> 
> $ for i in $(git grep -e "__attribute__.((packed))"	\
> 	include/linux/usb/ | cut -d: -f1 | uniq);	\
> 	do sed -i 's/__attribute__ ((packed))/__packed/g' \
> 	$i; done
> 
> It fixes checkpatch.pl warnings such as:
> 
>  WARNING: __packed is preferred over __attribute__((packed))
>  #838: FILE: linux/usb/ch9.h:838:
>  +} __attribute__((packed));
> 
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>

the following could actually do it kernel-wide:

for i in $(git grep -e "__attribute__ ((packed));" . | cut -d: -f1 | uniq);	\
	do sed -i 's/__attribute__ ((packed))/__packed/g' $i; done

but the patch would be huge:

$ git diff | wc -l
11016

$ git diff --state | tail -1
192 files changed, 1231 insertions(+), 1231 deletions(-)

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux