mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Wolfram Sang <w.sang@pengutronix.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: READ/WRITE definitions in drivers/spi/spi-omap-100k.c
Date: Thu, 24 Oct 2013 13:46:31 +0100	[thread overview]
Message-ID: <20131024124631.GA14517@mtj.dyndns.org> (raw)

Hey, guys.

I was modifying includes in a core header file and got duplicate macro
definition warnings on READ / WRITE in drivers/spi/spi-omap-100k.c.
Apparently that driver defines READ / WRITE as macros and assigns the
opposite values to them from the usual READ / WRITE constants defined
in include/linux/fs.h.

I just skimmed through it and there doesn't seem to be any user of the
macros.  Can we *please* remove these?  Please note that READ / WRITE
defined in include/linux/fs.h is something which is widely used
throughout the kernel and there are multiple interfaces which take
those constants.  Re-defining them in the other way around in a driver
file can lead to subtle issues and just is a bad idea.  In general,
refraining from using generic symbols without any qualitification in
low level drivers would be nice.

Thanks.

-- 
tejun

             reply	other threads:[~2013-10-24 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 12:46 Tejun Heo [this message]
2013-10-29 13:34 ` Linus Walleij
2013-10-29 16:24   ` Mark Brown

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=20131024124631.GA14517@mtj.dyndns.org \
    --to=tj@kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=w.sang@pengutronix.de \
    /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

all inboxes | Powered by JetHome®