LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ricardo.ribalda@gmail.com
Cc: arnd@arndb.de, will.deacon@arm.com, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparc: io_64.h: Replace io function-link macros
Date: Fri, 30 Jan 2015 18:07:02 -0800 (PST)	[thread overview]
Message-ID: <20150130.180702.537095959594952246.davem@davemloft.net> (raw)
In-Reply-To: <1422543122-21956-1-git-send-email-ricardo.ribalda@gmail.com>

From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date: Thu, 29 Jan 2015 15:52:02 +0100

> Function like macros cannot be assigned to function pointers. This patch
> convert the function-like macros into object-macros, that the
> precompiler will replace with the name of the final function.
> 
> With this patch this kind of code will work:
> 
> if (priv->mode_big_endian)
> 	priv.read = ioread32be;
> else
> 	priv.read = ioread32;
> 
> Same approach has been taken on asm-generic/io.h
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Fixes: 99082eab63449f9d spi/xilinx: Remove iowrite/ioread wrappers
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>

Acked-by: David S. Miller <davem@davemloft.net>

      parent reply	other threads:[~2015-01-31  2:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 14:52 Ricardo Ribalda Delgado
2015-01-29 16:02 ` Arnd Bergmann
2015-01-29 16:33   ` Ricardo Ribalda Delgado
2015-01-31  2:07 ` David Miller [this message]

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=20150130.180702.537095959594952246.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ricardo.ribalda@gmail.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=will.deacon@arm.com \
    --subject='Re: [PATCH] sparc: io_64.h: Replace io function-link macros' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).