All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	David Lechner <david@lechnology.com>
Subject: Re: [PATCH v1 1/4] drm/tiny/repaper: Make driver OF-independent
Date: Mon, 27 Jan 2020 11:39:39 +0200	[thread overview]
Message-ID: <20200127093939.GR32742@smile.fi.intel.com> (raw)
In-Reply-To: <20200124181812.GA7883@ravnborg.org>

On Fri, Jan 24, 2020 at 07:18:12PM +0100, Sam Ravnborg wrote:
> On Fri, Jan 24, 2020 at 07:31:34PM +0200, Andy Shevchenko wrote:
> > On Fri, Jan 24, 2020 at 05:42:33PM +0100, Sam Ravnborg wrote:
> > > On Wed, Jan 22, 2020 at 12:54:00PM +0200, Andy Shevchenko wrote:
> > > > There is one OF call in the driver that limits its area of use.
> > > > Replace it to generic device_get_match_data() and get rid of OF dependency.
> > > > 
> > > > While here, cast SPI driver data to certain enumerator type.
> > 
> > > >  enum repaper_model {
> > > > +	EXXXXCSXXX = 0,
> > > >  	E1144CS021 = 1,
> > > >  	E1190CS021,
> > > >  	E2200CS021,
> > > The new enum value is not used in the following - is it necessary?
> > 
> > Yes. It explicitly prevents to use 0 for real device.
> > 
> > This is due to device_get_match_data() returns content of data pointer and thus
> > we may not distinguish 0 from NULL pointer.
> A name that told this was not a valid name would be descriptive.
> As it is now it looks like a wildcard that matches everythign else.

Can you be more precise what you would like to see?
Perhaps simple comment will help?

> With a more descriptive name:
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

-- 
With Best Regards,
Andy Shevchenko


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-01-28  8:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 10:54 [PATCH v1 1/4] drm/tiny/repaper: Make driver OF-independent Andy Shevchenko
2020-01-22 10:54 ` [PATCH v1 2/4] drm/tiny/repaper: No need to set ->owner for spi_register_driver() Andy Shevchenko
2020-01-22 16:02   ` David Lechner
2020-01-24 17:06   ` Sam Ravnborg
2020-01-24 17:32     ` Andy Shevchenko
2020-01-22 10:54 ` [PATCH v1 3/4] drm/tiny/st7735r: Make driver OF-independent Andy Shevchenko
2020-01-22 16:01   ` David Lechner
2020-01-22 10:54 ` [PATCH v1 4/4] drm/tiny/st7735r: No need to set ->owner for spi_register_driver() Andy Shevchenko
2020-01-22 16:00   ` David Lechner
2020-01-27  9:03     ` Daniel Vetter
2020-01-24 16:42 ` [PATCH v1 1/4] drm/tiny/repaper: Make driver OF-independent Sam Ravnborg
2020-01-24 17:31   ` Andy Shevchenko
2020-01-24 18:18     ` Sam Ravnborg
2020-01-27  9:39       ` Andy Shevchenko [this message]
2020-01-29 20:29         ` Sam Ravnborg
2020-01-31 19:45           ` 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=20200127093939.GR32742@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=david@lechnology.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sam@ravnborg.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 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.