Re: [PATCH] scsi: sd: Make protection lookup tables static

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

 



On Mon, 2019-01-07 at 17:27 +-0000, John Garry wrote:
+AD4 On 07/01/2019 16:57, Bart Van Assche wrote:
+AD4 +AD4 On Mon, 2019-01-07 at 22:41 +-0800, John Garry wrote:
+AD4 +AD4 +AD4 Currently the protection lookup tables in sd+AF8-prot+AF8-flag+AF8-mask() and
+AD4 +AD4 +AD4 sd+AF8-prot+AF8-op() are declared non-static. As such, they will be rebuilt for
+AD4 +AD4 +AD4 each respective function call.
+AD4 +AD4 +AD4 
+AD4 +AD4 +AD4 Optimise by making them static.
+AD4 +AD4 +AD4 
+AD4 +AD4 +AD4 This saves +AH4-100B object code for sd.c:
+AD4 +AD4 +AD4 
+AD4 +AD4 +AD4 Before:
+AD4 +AD4 +AD4    text	   data	    bss	    dec	    hex	filename
+AD4 +AD4 +AD4   25403	   1024	     16	  26443	   674b	drivers/scsi/sd.o
+AD4 +AD4 +AD4 
+AD4 +AD4 +AD4 After:
+AD4 +AD4 +AD4   text	   data	    bss	    dec	    hex	filename
+AD4 +AD4 +AD4   25299	   1024	     16	  26339	   66e3	drivers/scsi/sd.o
+AD4 +AD4 
+AD4 +AD4 Since the sd+AF8-prot+AF8-op() function only has a single caller, please move it from sd.h
+AD4 +AD4 into sd.c.
+AD4 
+AD4 Can do, as long as no one has objection.
+AD4 
+AD4 Function sd+AF8-prot+AF8-flag+AF8-mask() also has a single caller AFAICS, so this 
+AD4 could also be relocated.

Please move that function too from sd.h into sd.c.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux