lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Sep 2013 15:16:32 -0700
From:	Grant Grundler <grundler@...omium.org>
To:	Grant Grundler <grundler@...omium.org>
Cc:	Chris Ball <cjb@...top.org>, Ulf Hansson <ulf.hansson@...aro.org>,
	Seungwon Jeon <tgih.jun@...sung.com>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: core: remove issue_fn indirect function call

On Thu, Sep 26, 2013 at 2:56 PM, Grant Grundler <grundler@...omium.org> wrote:
> On Wed, Sep 25, 2013 at 7:37 PM, Chris Ball <cjb@...top.org> wrote:
>> Hi,
>>
>> On Wed, Sep 25 2013, Chris Ball wrote:
>>> Hi,
>>>
>>> On Fri, Sep 20 2013, Ulf Hansson wrote:
>>>> On 19 September 2013 19:20, Grant Grundler <grundler@...omium.org> wrote:
>>>>> struct mmc_queue defines issue_fn as an indirect function call.
>>>>> issue_fn field only gets set to mmc_blk_issue_rq and only gets
>>>>> invoked immediately after calling blk_fetch_request().
>>>>> Don't bother with indirect function call - it's pointless and just
>>>>> obfuscates the code.
>>>>>
>>>>> Signed-off-by: Grant Grundler <grundler@...omium.org>
>>>>
>>>> Acked-by: Ulf Hansson <ulf.hansson@...aro.org>
>>>
>>> Thanks, pushed to mmc-next for 3.13.
>>
>> Have dropped this, it's breaking my build:
>>
>> /home/cjb/git/mmc/drivers/mmc/card/block.c:1955:12: warning: ‘mmc_blk_issue_rq’ defined but not used [-Wunused-function]
>
> The function is declared static. :(  Let me respin to remove the
> static and add a function prototype to a header file.

block.o and queue.o are linked together into one .ko all the time:
obj-$(CONFIG_MMC_BLOCK)         += mmc_block.o
mmc_block-objs                  := block.o queue.o

Two ways to handle this: I can
1) add a local function prototype of mmc_blk_issue_rq() to queue.c
2) move mmc_init_queue() and mmc_queue_thread() from queue.c to block.c

(2) actually makes sense since both functions are block IO specific.

Thoughts? Preference? Other ideas?

thanks,
grant

ps. It's more obvious now that the return value from
mmc_blk_issue_rq() is getting ignored. *sigh*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ