public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: bchalios@amazon.es
Cc: linux-kernel@vger.kernel.org, tytso@mit.edu, Jason@zx2c4.com,
	dwmw@amazon.co.uk, graf@amazon.de, xmarcalx@amazon.co.uk
Subject: Re: [PATCH 2/2] virt: vmgenid: add support for generation counter
Date: Wed, 3 Aug 2022 17:31:47 +0200	[thread overview]
Message-ID: <YuqU4wXNBt4pAK+C@kroah.com> (raw)
In-Reply-To: <20220803152127.48281-3-bchalios@amazon.es>

On Wed, Aug 03, 2022 at 05:21:27PM +0200, bchalios@amazon.es wrote:
> +	/* Backwards compatibility. If CTRA is not there we just don't expose
> +	 * the char device

Backwards compatibility with what?

> +	 */
> +	ret = parse_vmgenid_address(device, "CTRA", &state->gen_cntr_addr);
> +	if (ret)
> +		return 0;
> +
> +	state->next_counter = devm_memremap(&device->dev, state->gen_cntr_addr,
> +			sizeof(u32), MEMREMAP_WB);
> +	if (IS_ERR(state->next_counter))
> +		return 0;

This too is an error, you can not return with "all is good", right?
Once you try to create this device because the address is present, you
can't just give up and succeed no matter what went wrong, that seems
incorrect.

thanks,

greg k-h

  parent reply	other threads:[~2022-08-03 15:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 15:21 [PATCH 0/2] virt: vmgenid: add generation counter bchalios
2022-08-03 15:21 ` [PATCH 1/2] virt: vmgenid: add helper function to parse ADDR bchalios
2022-08-03 15:21 ` [PATCH 2/2] virt: vmgenid: add support for generation counter bchalios
2022-08-03 15:28   ` Greg KH
2022-08-03 15:30   ` Greg KH
2022-08-03 17:53     ` Chalios, Babis
2022-08-03 15:31   ` Greg KH [this message]
2022-08-03 17:58     ` Chalios, Babis
2022-08-14  3:26   ` kernel test robot
2022-08-03 15:50 ` [PATCH 0/2] virt: vmgenid: add " Chalios, Babis
2022-08-03 15:57 ` Chalios, Babis
2022-08-04 13:33 ` Chalios, Babis
2022-08-04 14:59 ` Jason A. Donenfeld
2022-08-04 15:46   ` bchalios
2022-08-10  9:19   ` bchalios

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=YuqU4wXNBt4pAK+C@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Jason@zx2c4.com \
    --cc=bchalios@amazon.es \
    --cc=dwmw@amazon.co.uk \
    --cc=graf@amazon.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=xmarcalx@amazon.co.uk \
    /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