Patchwork [v3,8/8] mtd: cfi_util: do not printk if no extended query table

login
register
mail settings
Submitter Guillaume LECERF
Date April 22, 2010, 8:36 a.m.
Message ID <20100422083621.17166.14671.stgit@shiryu.yomgui.biz>
Download mbox | patch
Permalink /patch/50709/
State New
Headers show

Comments

Guillaume LECERF - April 22, 2010, 8:36 a.m.
Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
---
 drivers/mtd/chips/cfi_util.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Wolfram Sang - April 23, 2010, 1:39 a.m.
One thing here...

On Thu, Apr 22, 2010 at 10:36:21AM +0200, Guillaume LECERF wrote:
> Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
> ---
>  drivers/mtd/chips/cfi_util.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
> index ca584d0..6ce5107 100644
> --- a/drivers/mtd/chips/cfi_util.c
> +++ b/drivers/mtd/chips/cfi_util.c
> @@ -104,10 +104,11 @@ __xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* n
>  	int i;
>  	struct cfi_extquery *extp = NULL;
>  
> -	printk(" %s Extended Query Table at 0x%4.4X\n", name, adr);
>  	if (!adr)
>  		goto out;
>  
> +	printk(" %s Extended Query Table at 0x%4.4X\n", name, adr);
> +

Log level is missing. KERN_INFO or use pr_info?

>  	extp = kmalloc(size, GFP_KERNEL);
>  	if (!extp) {
>  		printk(KERN_ERR "Failed to allocate memory\n");
>

Patch

diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index ca584d0..6ce5107 100644
--- a/drivers/mtd/chips/cfi_util.c
+++ b/drivers/mtd/chips/cfi_util.c
@@ -104,10 +104,11 @@  __xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* n
 	int i;
 	struct cfi_extquery *extp = NULL;
 
-	printk(" %s Extended Query Table at 0x%4.4X\n", name, adr);
 	if (!adr)
 		goto out;
 
+	printk(" %s Extended Query Table at 0x%4.4X\n", name, adr);
+
 	extp = kmalloc(size, GFP_KERNEL);
 	if (!extp) {
 		printk(KERN_ERR "Failed to allocate memory\n");