Re: [PATCH 05/44 take 2] [UBI] internal common header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-02-19 at 10:54 +0000, Christoph Hellwig wrote:
> On Sat, Feb 17, 2007 at 06:54:49PM +0200, Artem Bityutskiy wrote:
> > +#ifndef __UBI_UBI_H__
> > +#define __UBI_UBI_H__
> > +
> > +#include <linux/mtd/ubi.h>
> > +
> > +/* Version of this UBI implementation */
> > +#define UBI_VERSION 1
> We shouldn't have versions for inkernel interfaces.

What do you mean? It is internal version just for future help: if we
develop incompatible UBI2 the old UBI will reject the new images.

> > +/* UBI messages printk level */
> > +#define UBI_MSG_LEVEL  KERN_INFO
> > +#define UBI_WARN_LEVEL KERN_WARNING
> > +#define UBI_ERR_LEVEL  KERN_ERR
> 
> Please use the KERN_ macros directly.

Will be done, thanks.

> > +/* UBI error messages */
> > +#define ubi_err(fmt, ...)                                                   \
> > +	printk(UBI_ERR_LEVEL UBI_ERR_PREF " %s " fmt "\n", __FUNCTION__,    \
> > +	       ##__VA_ARGS__)
> 
> you should probably use dev_printk and the wrappers around it in most
> places.

I will look at it, thanks.

> > +extern int ubis_num;
> > +extern struct ubi_info *ubis[UBI_MAX_INSTANCES];
> 
> Having this kind of global information directly exposed is a very
> bad idea.  In general you only want to access it through more
> specific information and avoid allocating the global array at all.

I do not see what is the problem with this. Please, refine.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux