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]
Message-ID: <4DA96890.2070207@codeaurora.org>
Date:	Sat, 16 Apr 2011 15:29:44 +0530
From:	Murali Nalajala <mnalajal@...eaurora.org>
To:	dedekind1@...il.com
CC:	dwmw2@...radead.org, linux-mtd@...ts.infradead.org,
	linux-arm-msm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Dima Zavin <dima@...roid.com>,
	Brian Swetland <swetland@...gle.com>,
	Arve Hjønnevåg <arve@...roid.com>
Subject: Re: [PATCH 2/2] mtd: msm_nand: Add initial msm nand driver support.

On 4/16/2011 1:50 PM, Artem Bityutskiy wrote:
> On Fri, 2011-04-15 at 20:20 +0530, Murali Nalajala wrote:
>> On 4/15/2011 3:21 PM, Artem Bityutskiy wrote:
>>> On Tue, 2011-03-01 at 06:17 +0530, Murali Nalajala wrote:
>>>> +#define pr_fmt(fmt) "%s:" fmt, __func__
>>>> +
>>>> +#include<linux/kernel.h>
>>>> +#include<linux/mtd/mtd.h>
>>>> +#include<linux/mtd/nand.h>
>>>> +#include<linux/mtd/partitions.h>
>>>> +#include<linux/platform_device.h>
>>>> +#include<linux/sched.h>
>>>> +#include<linux/slab.h>
>>>> +#include<linux/dma-mapping.h>
>>>> +#include<asm/mach/flash.h>
>>>> +#include<mach/dma.h>
>>>> +
>>>> +#include "msm_nand.h"
>>>> +
>>>> +unsigned long msm_nand_phys;
>>>
>>> No global variables like this please. Here is how you use them:
>>>
>>> +extern unsigned long msm_nand_phys;
>>
>> extern declaration in the 'C' file causing warning. We are in plan to
>> upload the OneNAND changes soon which makes use of the same .h file.
>
> So you say that OneNAND (an independent driver) is going to use this
> variable? Are you also going to export it?

I haven't decided yet when oneNAND driver come in still it is under 
discussion. There is a chance that if OneNAND comes as an individual 
driver then i have to export this variable.

Can i export this variable now? What is your suggestion?

>
>>> +#define MSM_NAND_REG(off) (msm_nand_phys + (off))
>>> +
>>> +#define MSM_NAND_FLASH_CMD            MSM_NAND_REG(0x0000)
>>> +#define MSM_NAND_ADDR0                MSM_NAND_REG(0x0004)
>>>
>>> Could you please make the macros to take the "struct msm_nand_chip
>>> *chip" argument instead, and store the pase address there. Do not hide
>>> the fact that those macros are actually functions, not constant - this
>>> is error prone.
>>>
>>> Besides, I'm do not know your HW, but if you have several controllers
>>> with various base addresses - your driver won't work.
>>
>> you are correct, we have multiple controllers, which breaks this logic
>> in future.
>
> So then make your macros to accept the base address as an argument
> instead please.
>


Thanks,
Murali N

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
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