Linux-Aspeed Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH 2/9] mtd: add mtd_is_master helper
Date: Tue, 02 Jul 2024 08:39:48 -0000	[thread overview]
Message-ID: <20240702082251.ljdaz2b7agabbm76@pengutronix.de> (raw)
In-Reply-To: <b97bf565-bef5-fbc7-63c5-f174880ad9ab@gmail.com>

On 24-07-01, Sergei Shtylyov wrote:
> On 7/1/24 4:53 PM, Marco Felsch wrote:
> 
> > Provide a simple helper to make it easy to detect an master mtd device.
> > 
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> >  include/linux/mtd/mtd.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
> > index 8d10d9d2e830..bf3fc2ea7230 100644
> > --- a/include/linux/mtd/mtd.h
> > +++ b/include/linux/mtd/mtd.h
> > @@ -408,6 +408,11 @@ static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
> >  	return mtd;
> >  }
> >  
> > +static inline bool mtd_is_master(struct mtd_info *mtd)
> > +{
> > +	return mtd->parent ? false : true;
> 
>    Perhaps:
> 
> 	return !mtd->parent;

Sure, if you prefer this style rather I will change it.

Regards,
  Marco

  reply	other threads:[~2024-07-02  8:39 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 14:15 [PATCH 0/9] AT24 EEPROM MTD Support Marco Felsch
2024-07-01 14:14 ` [PATCH 1/9] mtd: core: add nvmem_write support Marco Felsch
2024-07-01 14:14 ` [PATCH 7/9] MIPS: configs: convert to MTD_EEPROM_AT24 Marco Felsch
2024-07-01 14:15 ` [PATCH 3/9] mtd: add support to handle EEPROM devices Marco Felsch
2024-07-01 14:15 ` [PATCH 9/9] eeprom: at24: remove deprecated Kconfig symbol Marco Felsch
2024-07-02  8:57   ` Bartosz Golaszewski
2024-07-02  9:16     ` Marco Felsch
2024-07-01 14:15 ` [PATCH 8/9] LoongArch: convert to MTD_EEPROM_AT24 Marco Felsch
2024-07-01 14:15 ` [PATCH 5/9] ARM: defconfig: " Marco Felsch
2024-07-10 12:56   ` Arnd Bergmann
2024-07-10 13:00     ` Bartosz Golaszewski
2024-07-10 14:06       ` Arnd Bergmann
2024-07-01 14:15 ` [PATCH 6/9] powerpc: " Marco Felsch
2024-07-01 14:15 ` [PATCH 2/9] mtd: add mtd_is_master helper Marco Felsch
2024-07-01 16:14   ` Sergei Shtylyov
2024-07-02  8:39     ` Marco Felsch [this message]
2024-07-01 14:15 ` [PATCH 4/9] mtd: devices: add AT24 eeprom support Marco Felsch
2024-07-01 16:14   ` Tudor Ambarus
2024-07-02 13:42     ` Pratyush Yadav
2024-07-02 13:56       ` Maxime Ripard
2024-07-02 14:15         ` Pratyush Yadav
2024-07-02 14:34           ` Maxime Ripard
2024-07-08  7:05             ` Miquel Raynal
2024-07-09  9:24               ` Marco Felsch
2024-07-09  9:43                 ` Miquel Raynal
2024-07-09 10:39                   ` Marco Felsch
2024-07-17  8:20                     ` Miquel Raynal
2024-07-18  9:20                       ` Marco Felsch
2024-08-23 15:37                         ` Miquel Raynal
2024-08-23 16:24 ` [PATCH 0/9] AT24 EEPROM MTD Support Andy Shevchenko
2024-08-26  7:51   ` Marco Felsch
2024-08-26 10:32     ` Andy Shevchenko

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=20240702082251.ljdaz2b7agabbm76@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=linux-aspeed@lists.ozlabs.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