From: Jens Axboe <axboe@kernel.dk>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
Bjorn Helgaas <helgaas@kernel.org>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Cc: Puranjay Mohan <puranjay12@gmail.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"bjorn@helgaas.com" <bjorn@helgaas.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] drivers: block: save return value of pci_find_capability() in u8
Date: Mon, 7 Dec 2020 11:38:16 -0700 [thread overview]
Message-ID: <7fa99c5f-6f0b-4cd6-7af2-db5877b1857a@kernel.dk> (raw)
In-Reply-To: <CH2PR04MB65228D22105F039C046096A6E7CE0@CH2PR04MB6522.namprd04.prod.outlook.com>
On 12/6/20 6:30 PM, Damien Le Moal wrote:
> On 2020/12/07 10:26, Bjorn Helgaas wrote:
>> On Sun, Dec 06, 2020 at 11:08:14PM +0000, Chaitanya Kulkarni wrote:
>>> On 12/6/20 11:45, Puranjay Mohan wrote:
>>>> Callers of pci_find_capability should save the return value in u8.
>>>> change type of variables from int to u8 to match the specification.
>>>
>>> I did not understand this, pci_find_capability() does not return u8.
>>>
>>> what is it that we are achieving by changing the variable type ?
>>>
>>> This patch will probably also generate type mismatch warning with
>>>
>>> certain static analyzers.
>>
>> There's a patch pending via the PCI tree to change the return type to
>> u8. We can do one of:
>>
>> - Ignore this. It only changes something on the stack, so no real
>> space saving and there's no problem assigning the u8 return value
>> to the "int".
>>
>> - The maintainer could ack it and I could merge it via the PCI tree
>> so it happens in the correct order (after the interface change).
>
> That works for me. But this driver changes generally go through Jens block tree.
>
> Jens,
>
> Is this OK with you if Bjorn takes the patch through the PCI tree ?
Yep that's fine, if that makes it easier to handle.
--
Jens Axboe
next prev parent reply other threads:[~2020-12-07 18:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-06 19:43 [PATCH] drivers: block: save return value of pci_find_capability() in u8 Puranjay Mohan
2020-12-06 23:08 ` Chaitanya Kulkarni
2020-12-07 1:26 ` Bjorn Helgaas
2020-12-07 1:30 ` Damien Le Moal
2020-12-07 18:38 ` Jens Axboe [this message]
2020-12-07 1:48 ` Chaitanya Kulkarni
2020-12-07 16:17 ` Ben Dooks
2020-12-07 2:25 ` Damien Le Moal
2020-12-07 14:52 ` Christoph Hellwig
2020-12-07 16:04 ` Bjorn Helgaas
2020-12-07 17:53 ` Puranjay Mohan
2020-12-07 18:07 ` Keith Busch
2020-12-07 18:35 ` Puranjay Mohan
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=7fa99c5f-6f0b-4cd6-7af2-db5877b1857a@kernel.dk \
--to=axboe@kernel.dk \
--cc=Chaitanya.Kulkarni@wdc.com \
--cc=Damien.LeMoal@wdc.com \
--cc=bjorn@helgaas.com \
--cc=helgaas@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=puranjay12@gmail.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;
as well as URLs for NNTP newsgroup(s).