From: Bart Van Assche <bvanassche@acm.org>
To: John Garry <john.garry@huawei.com>,
jejb@linux.vnet.ibm.com, martin.petersen@oracle.com
Cc: linuxarm@huawei.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: sd: Make protection lookup tables static
Date: Mon, 07 Jan 2019 09:33:28 -0800 [thread overview]
Message-ID: <1546882408.83374.14.camel@acm.org> (raw)
In-Reply-To: <b269a676-8941-4de4-faed-c40ec0d0a45a@huawei.com>
On Mon, 2019-01-07 at 17:27 +0000, John Garry wrote:
> 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.
Please move that function too from sd.h into sd.c.
Thanks,
Bart.
prev parent reply other threads:[~2019-01-07 17:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 14:41 [PATCH] scsi: sd: Make protection lookup tables static John Garry
2019-01-07 16:57 ` Bart Van Assche
2019-01-07 17:27 ` John Garry
2019-01-07 17:33 ` Bart Van Assche [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546882408.83374.14.camel@acm.org \
--to=bvanassche@acm.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox