netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 4/x] sunhme: switch to devres
Date: Wed, 24 Aug 2022 11:57:22 -0400	[thread overview]
Message-ID: <812378b7-80ed-e966-248c-d00a3377a333@gmail.com> (raw)
In-Reply-To: <3192215.44csPzL39Z@eto.sf-tec.de>

On 8/24/22 11:45 AM, Rolf Eike Beer wrote:
> Am Montag, 1. August 2022, 17:14:39 CEST schrieb Rolf Eike Beer:
>> Am Freitag, 29. Juli 2022, 02:33:01 CEST schrieb Sean Anderson:
>>> On 7/28/22 3:52 PM, Rolf Eike Beer wrote:
>>>> Am 2022-07-27 05:58, schrieb Sean Anderson:
>>>>> On 7/26/22 11:49 PM, Sean Anderson wrote:
>>>>>> This looks good, but doesn't apply cleanly. I rebased it as follows:
>>>> Looks like what my local rebase has also produced.
>>>>
>>>> The sentence about the leak from the commitmessage can be dropped then,
>>>> as this leak has already been fixed.
>>>>
>>>>>> diff --git a/drivers/net/ethernet/sun/sunhme.c
>>>>>> b/drivers/net/ethernet/sun/sunhme.c index eebe8c5f480c..e83774ffaa7a
>>>>>> 100644
>>>>>> --- a/drivers/net/ethernet/sun/sunhme.c
>>>>>> +++ b/drivers/net/ethernet/sun/sunhme.c
>>>>>> @@ -2990,21 +2990,23 @@ static int happy_meal_pci_probe(struct pci_dev
>>>>>> *pdev, qp->happy_meals[qfe_slot] = dev;
>>>>>>
>>>>>>        }
>>>>>>
>>>>>> -    hpreg_res = pci_resource_start(pdev, 0);
>>>>>> -    err = -ENODEV;
>>>>>>
>>>>>>        if ((pci_resource_flags(pdev, 0) & IORESOURCE_IO) != 0) {
>>>>>>        
>>>>>>            printk(KERN_ERR "happymeal(PCI): Cannot find proper PCI
>>>>>>            device
>>>>>>
>>>>>> base address.\n"); goto err_out_clear_quattro;
>>>>>>
>>>>>>        }
>>>>>>
>>>>>> -    if (pci_request_regions(pdev, DRV_NAME)) {
>>>>>> +
>>>>>> +    if (!devm_request_region(&pdev->dev, pci_resource_start(pdev, 0),
>>>>>> +                  pci_resource_len(pdev, 0),
>>>>>> +                  DRV_NAME)) {
>>>>>
>>>>> Actually, it looks like you are failing to set err from these *m
>>>>> calls, like what
>>>>> you fixed in patch 3. Can you address this for v2?
>>>>
>>>> It returns NULL on error, there is no error code I can set.
>>>
>>> So it does. A quick grep shows that most drivers return -EBUSY.
>>
>> Sure, I just meant that there is no error code I can pass on. I can change
>> that to -EBUSY if you prefer that, currently it just returns -ENODEV as the
>> old code has done before.
> 
> Ping?

I think -EBUSY is a good return here.

I have a WIP at [1] of some logging cleanups on top of your commits.

--Sean

[1] https://github.com/Forty-Bot/linux/commits/hme_base

  reply	other threads:[~2022-08-24 15:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 16:20 sunhme: some cleanups Rolf Eike Beer
2022-02-03 16:21 ` [PATCH 1/3] sunhme: remove unused tx_dump_ring() Rolf Eike Beer
2022-07-27  3:42   ` Sean Anderson
2022-02-03 16:22 ` [PATCH 2/3] sunhme: fix the version number in struct ethtool_drvinfo Rolf Eike Beer
2022-02-03 17:12   ` Andrew Lunn
2022-02-05 11:27     ` Rolf Eike Beer
2022-02-05 14:48       ` Andrew Lunn
2022-02-05 15:57         ` Rolf Eike Beer
2022-02-05 16:32           ` Andrew Lunn
2022-02-03 21:53   ` Jakub Kicinski
2022-02-14 18:33   ` [PATCH 2/3 v2] " Rolf Eike Beer
2022-02-03 16:23 ` [PATCH 3/3] sunhme: forward the error code from pci_enable_device() Rolf Eike Beer
2022-07-27  3:48   ` Sean Anderson
2022-02-14 18:31 ` [PATCH 4/x] sunhme: switch to devres Rolf Eike Beer
2022-07-27  3:49   ` Sean Anderson
2022-07-27  3:58     ` Sean Anderson
2022-07-28 19:52       ` Rolf Eike Beer
2022-07-29  0:33         ` Sean Anderson
2022-08-01 15:14           ` Rolf Eike Beer
2022-08-24 15:45             ` Rolf Eike Beer
2022-08-24 15:57               ` Sean Anderson [this message]
2022-08-29 13:22   ` [PATCH 4/4 v2] " Rolf Eike Beer
2022-08-30  0:16     ` Jakub Kicinski

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=812378b7-80ed-e966-248c-d00a3377a333@gmail.com \
    --to=seanga2@gmail.com \
    --cc=eike-kernel@sf-tec.de \
    --cc=netdev@vger.kernel.org \
    /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).