From: Johannes Thumshirn <jth@kernel.org>
To: "Rodríguez Barbarin,
José Javier" <JoseJavier.Rodriguez@duagon.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "jth@kernel.org" <jth@kernel.org>,
"Sanjuán García, Jorge" <Jorge.SanjuanGarcia@duagon.com>
Subject: Re: [PATCH v2 1/3] mcb: Return actual parsed size when reading chameleon table
Date: Tue, 28 Mar 2023 21:16:00 +0200 [thread overview]
Message-ID: <29e2695e-a08a-2ffa-4323-c0286fcea9ef@kernel.org> (raw)
In-Reply-To: <20230328143441.78932-2-josejavier.rodriguez@duagon.com>
Am 28.03.23 um 16:34 schrieb Rodríguez Barbarin, José Javier:
> Function chameleon_parse_cells() returns the number of cells parsed
^ The function?
> @@ -239,12 +240,15 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
> num_cells++;
> }
>
> +
Stray newline.
> if (num_cells == 0)
> num_cells = -EINVAL;
>
> + table_size = p - base;
> + pr_debug("%d cell(s) found. Chameleon table size: 0x%04x bytes\n", num_cells, table_size);
> kfree(cb);
> kfree(header);
> - return num_cells;
> + return table_size;
Ahm doesn't that need to be:
return num_cells < 0 ? num_cells : table_size;
Otherwise we loose the -EINVAL return here.
I could've fixed up the 1st two, but the last one is a functional change
and I won't fix it
up when applying.
Byte,
Johannes
next prev parent reply other threads:[~2023-03-28 19:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 14:34 [PATCH v2 0/3] mcb-pci: fix memory overlapping on MCB devices Rodríguez Barbarin, José Javier
2023-03-28 14:34 ` [PATCH v2 1/3] mcb: Return actual parsed size when reading chameleon table Rodríguez Barbarin, José Javier
2023-03-28 19:16 ` Johannes Thumshirn [this message]
2023-03-28 14:35 ` [PATCH v2 2/3] mcb-pci: Reallocate memory region to avoid memory overlapping Rodríguez Barbarin, José Javier
2023-03-28 14:35 ` [PATCH v2 3/3] mcb-lpc: " Rodríguez Barbarin, José Javier
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=29e2695e-a08a-2ffa-4323-c0286fcea9ef@kernel.org \
--to=jth@kernel.org \
--cc=Jorge.SanjuanGarcia@duagon.com \
--cc=JoseJavier.Rodriguez@duagon.com \
--cc=linux-kernel@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
Powered by JetHome