From: Damien Le Moal <dlemoal@kernel.org>
To: Niklas Cassel <cassel@kernel.org>, dayou5941@163.com
Cc: linux-ide@vger.kernel.org, liyouhong@kylinos.cn
Subject: Re: [PATCH v4] ata: ahci: fail probe if BAR too small for claimed ports
Date: Tue, 28 Apr 2026 05:23:12 +0900 [thread overview]
Message-ID: <a805fa86-0fe7-4803-ad2e-45719415f263@kernel.org> (raw)
In-Reply-To: <ae9TGoaQAi7dOVc0@ryzen>
On 2026/04/27 21:14, Niklas Cassel wrote:
>> + max_ports, last_port_end,
>> + (unsigned long long)bar_size);
>
> Print resource_size_t as %pa instead of casting to unsigned long long
> and pass bar_size by reference (&bar_size):
> https://docs.kernel.org/core-api/printk-formats.html#physical-address-types-phys-addr-t
>
>
>> + return -ENODEV;
>
> return -EIO;
I do not agree here. We did not do any I/O. If anything, this should be EINVAL.
But I think that ENODEV is safer since we are in the probe context here and we
do not want to see that device show up.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-04-27 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 6:05 [PATCH v4] ata: ahci: fail probe if BAR too small for claimed ports dayou5941
2026-04-27 12:14 ` Niklas Cassel
2026-04-27 20:23 ` Damien Le Moal [this message]
2026-04-27 20:32 ` Niklas Cassel
2026-04-27 21:47 ` Damien Le Moal
2026-04-27 22:10 ` Niklas Cassel
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=a805fa86-0fe7-4803-ad2e-45719415f263@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=dayou5941@163.com \
--cc=linux-ide@vger.kernel.org \
--cc=liyouhong@kylinos.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.