lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b269a676-8941-4de4-faed-c40ec0d0a45a@huawei.com>
Date:   Mon, 7 Jan 2019 17:27:58 +0000
From:   John Garry <john.garry@...wei.com>
To:     Bart Van Assche <bvanassche@....org>, <jejb@...ux.vnet.ibm.com>,
        <martin.petersen@...cle.com>
CC:     <linuxarm@...wei.com>, <linux-kernel@...r.kernel.org>,
        <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH] scsi: sd: Make protection lookup tables static

On 07/01/2019 16:57, Bart Van Assche wrote:
> On Mon, 2019-01-07 at 22:41 +0800, John Garry wrote:
>> Currently the protection lookup tables in sd_prot_flag_mask() and
>> sd_prot_op() are declared non-static. As such, they will be rebuilt for
>> each respective function call.
>>
>> Optimise by making them static.
>>
>> This saves ~100B object code for sd.c:
>>
>> Before:
>>    text	   data	    bss	    dec	    hex	filename
>>   25403	   1024	     16	  26443	   674b	drivers/scsi/sd.o
>>
>> After:
>>   text	   data	    bss	    dec	    hex	filename
>>   25299	   1024	     16	  26339	   66e3	drivers/scsi/sd.o
>
> Since the sd_prot_op() function only has a single caller, please move it from sd.h
> into sd.c.

Can do, as long as no one has objection.

Function sd_prot_flag_mask() also has a single caller AFAICS, so this 
could also be relocated.

Cheers,
John

>
> Thanks,
>
> Bart.
>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ