From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762129AbbAaCHG (ORCPT ); Fri, 30 Jan 2015 21:07:06 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:52096 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762011AbbAaCHE (ORCPT ); Fri, 30 Jan 2015 21:07:04 -0500 Date: Fri, 30 Jan 2015 18:07:02 -0800 (PST) Message-Id: <20150130.180702.537095959594952246.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 From: David Miller In-Reply-To: <1422543122-21956-1-git-send-email-ricardo.ribalda@gmail.com> References: <1422543122-21956-1-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: Mew version 6.5 on Emacs 24.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.7 (shards.monkeyblade.net [149.20.54.216]); Fri, 30 Jan 2015 18:07:03 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ricardo Ribalda Delgado 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 > Fixes: 99082eab63449f9d spi/xilinx: Remove iowrite/ioread wrappers > Signed-off-by: Ricardo Ribalda Delgado Acked-by: David S. Miller