[3/5] mtd: remove MEMSETOOBSEL macro definition
diff mbox

Message ID 1314145056-5233-3-git-send-email-computersforpeace@gmail.com
State New, archived
Headers show

Commit Message

Brian Norris Aug. 24, 2011, 12:17 a.m. UTC
MEMSETOOBSEL is completely unused and useless. Remove the definition.

Note: it's probably best not to use this ioctl number in the future for
MTD, since that may cause conflicts between old kernels and new user
software (or new kernels and old user software). This shouldn't be much
problem.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 include/mtd/mtd-abi.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Ricard Wanderlof Aug. 24, 2011, 12:28 p.m. UTC | #1
On Wed, 24 Aug 2011, Brian Norris wrote:

> MEMSETOOBSEL is completely unused and useless. Remove the definition.
>
> Note: it's probably best not to use this ioctl number in the future for
> MTD, since that may cause conflicts between old kernels and new user
> software (or new kernels and old user software). This shouldn't be much
> problem.

Perhaps this should be noted as a comment in the code, rather than just 
removing the line. Such information tends to get forgotten sooner or later 
otherwise.

>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
> include/mtd/mtd-abi.h |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
> index 2f7d45b..f0e8027 100644
> --- a/include/mtd/mtd-abi.h
> +++ b/include/mtd/mtd-abi.h
> @@ -112,7 +112,7 @@ struct otp_info {
> #define MEMUNLOCK		_IOW('M', 6, struct erase_info_user)
> #define MEMGETREGIONCOUNT	_IOR('M', 7, int)
> #define MEMGETREGIONINFO	_IOWR('M', 8, struct region_info_user)
> -#define MEMSETOOBSEL		_IOW('M', 9, struct nand_oobinfo)
> +
> #define MEMGETOOBSEL		_IOR('M', 10, struct nand_oobinfo)
> #define MEMGETBADBLOCK		_IOW('M', 11, __kernel_loff_t)
> #define MEMSETBADBLOCK		_IOW('M', 12, __kernel_loff_t)
> -- 
> 1.7.5.4

/Ricard
Artem Bityutskiy Aug. 24, 2011, 1:19 p.m. UTC | #2
On Wed, 2011-08-24 at 14:28 +0200, Ricard Wanderlof wrote:
> On Wed, 24 Aug 2011, Brian Norris wrote:
> 
> > MEMSETOOBSEL is completely unused and useless. Remove the definition.
> >
> > Note: it's probably best not to use this ioctl number in the future for
> > MTD, since that may cause conflicts between old kernels and new user
> > software (or new kernels and old user software). This shouldn't be much
> > problem.
> 
> Perhaps this should be noted as a comment in the code, rather than just 
> removing the line. Such information tends to get forgotten sooner or later 
> otherwise.

Yeah, I've amended the patch and added a comment:

+/*
+ * Note, the following ioctl existed in the past and was removed:
+ * #define MEMSETOOBSEL           _IOW('M', 9, struct nand_oobinfo)
+ * Try to avoid adding a new ioctl with the same ioctl number.
+ */

Patch
diff mbox

diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index 2f7d45b..f0e8027 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -112,7 +112,7 @@  struct otp_info {
 #define MEMUNLOCK		_IOW('M', 6, struct erase_info_user)
 #define MEMGETREGIONCOUNT	_IOR('M', 7, int)
 #define MEMGETREGIONINFO	_IOWR('M', 8, struct region_info_user)
-#define MEMSETOOBSEL		_IOW('M', 9, struct nand_oobinfo)
+
 #define MEMGETOOBSEL		_IOR('M', 10, struct nand_oobinfo)
 #define MEMGETBADBLOCK		_IOW('M', 11, __kernel_loff_t)
 #define MEMSETBADBLOCK		_IOW('M', 12, __kernel_loff_t)