[PATCHv1 1/4] staging:lustre:lnet: lib-md.c make line not over 80 characters

2014-08-30 Thread Janet Liu
Silences the following checkpatch warning:
  WARNING: line over 80 characters

Signed-off-by: Janet Liu jianhua@gmail.com
---
 drivers/staging/lustre/lnet/lnet/lib-md.c |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c 
b/drivers/staging/lustre/lnet/lnet/lib-md.c
index 1f386e0..efd1b82 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-md.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-md.c
@@ -52,7 +52,8 @@ lnet_md_unlink(lnet_libmd_t *md)
 
md-md_flags |= LNET_MD_FLAG_ZOMBIE;
 
-   /* Disassociate from ME (if any), and unlink it if it was 
created
+   /* Disassociate from ME (if any),
+* and unlink it if it was created
 * with LNET_UNLINK */
if (me != NULL) {
/* detach MD from portal */
@@ -113,7 +114,8 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
for (i = 0; i  (int)niov; i++) {
/* We take the base address on trust */
-   if (lmd-md_iov.iov[i].iov_len = 0) /* invalid length 
*/
+   /* invalid length */
+   if (lmd-md_iov.iov[i].iov_len = 0)
return -EINVAL;
 
total_length += lmd-md_iov.iov[i].iov_len;
@@ -121,7 +123,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
lmd-md_length = total_length;
 
-   if ((umd-options  LNET_MD_MAX_SIZE) != 0  /* max size used 
*/
+   if ((umd-options  LNET_MD_MAX_SIZE) != 0  /*max size used*/
(umd-max_size  0 ||
 umd-max_size  total_length)) // illegal max_size
return -EINVAL;
@@ -142,7 +144,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
lmd-md_length = total_length;
 
-   if ((umd-options  LNET_MD_MAX_SIZE) != 0  /* max size used 
*/
+   if ((umd-options  LNET_MD_MAX_SIZE) != 0  /*max size used*/
(umd-max_size  0 ||
 umd-max_size  total_length)) // illegal max_size
return -EINVAL;
@@ -152,7 +154,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
lmd-md_iov.iov[0].iov_base = umd-start;
lmd-md_iov.iov[0].iov_len = umd-length;
 
-   if ((umd-options  LNET_MD_MAX_SIZE) != 0  /* max size used 
*/
+   if ((umd-options  LNET_MD_MAX_SIZE) != 0  /*max size used*/
(umd-max_size  0 ||
 umd-max_size  (int)umd-length)) // illegal max_size
return -EINVAL;
@@ -206,7 +208,8 @@ lnet_md_deconstruct(lnet_libmd_t *lmd, lnet_md_t *umd)
 * and that's all.
 */
umd-start = lmd-md_start;
-   umd-length = ((lmd-md_options  (LNET_MD_IOVEC | LNET_MD_KIOV)) == 0) 
?
+   umd-length = ((lmd-md_options 
+   (LNET_MD_IOVEC | LNET_MD_KIOV)) == 0) ?
  lmd-md_length : lmd-md_niov;
umd-threshold = lmd-md_threshold;
umd-max_size = lmd-md_max_size;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv1 2/4] staging:lustre:lnet: lib-md.c delete space before '(' for code style

2014-08-30 Thread Janet Liu
Silences the following checkpatch warning:
  WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Janet Liu jianhua@gmail.com
---
 drivers/staging/lustre/lnet/lnet/lib-md.c |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c 
b/drivers/staging/lustre/lnet/lnet/lib-md.c
index efd1b82..13f4332 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-md.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-md.c
@@ -110,7 +110,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
lmd-md_niov = niov = umd-length;
memcpy(lmd-md_iov.iov, umd-start,
-  niov * sizeof (lmd-md_iov.iov[0]));
+  niov * sizeof(lmd-md_iov.iov[0]));
 
for (i = 0; i  (int)niov; i++) {
/* We take the base address on trust */
@@ -131,7 +131,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
} else if ((umd-options  LNET_MD_KIOV) != 0) {
lmd-md_niov = niov = umd-length;
memcpy(lmd-md_iov.kiov, umd-start,
-  niov * sizeof (lmd-md_iov.kiov[0]));
+  niov * sizeof(lmd-md_iov.kiov[0]));
 
for (i = 0; i  (int)niov; i++) {
/* We take the page pointer on trust */
@@ -266,15 +266,15 @@ int
 LNetMDAttach(lnet_handle_me_t meh, lnet_md_t umd,
 lnet_unlink_t unlink, lnet_handle_md_t *handle)
 {
-   LIST_HEAD   (matches);
-   LIST_HEAD   (drops);
+   LIST_HEAD(matches);
+   LIST_HEAD(drops);
struct lnet_me  *me;
struct lnet_libmd   *md;
int cpt;
int rc;
 
-   LASSERT (the_lnet.ln_init);
-   LASSERT (the_lnet.ln_refcount  0);
+   LASSERT(the_lnet.ln_init);
+   LASSERT(the_lnet.ln_refcount  0);
 
if (lnet_md_validate(umd) != 0)
return -EINVAL;
@@ -350,8 +350,8 @@ LNetMDBind(lnet_md_t umd, lnet_unlink_t unlink, 
lnet_handle_md_t *handle)
int cpt;
int rc;
 
-   LASSERT (the_lnet.ln_init);
-   LASSERT (the_lnet.ln_refcount  0);
+   LASSERT(the_lnet.ln_init);
+   LASSERT(the_lnet.ln_refcount  0);
 
if (lnet_md_validate(umd) != 0)
return -EINVAL;
@@ -419,7 +419,7 @@ EXPORT_SYMBOL(LNetMDBind);
  * \retval -ENOENT If \a mdh does not point to a valid MD object.
  */
 int
-LNetMDUnlink (lnet_handle_md_t mdh)
+LNetMDUnlink(lnet_handle_md_t mdh)
 {
lnet_event_tev;
lnet_libmd_t*md;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv1 3/4] staging:lustre:lnet: lib-md.c erase C99 // comments

2014-08-30 Thread Janet Liu
After changing the comments format, the other error disappears.
So silences two checkpatch errors:
  ERROR: do not use C99 // comments
  ERROR: trailing statements should be on next line

Signed-off-by: Janet Liu jianhua@gmail.com
---
 drivers/staging/lustre/lnet/lnet/lib-md.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c 
b/drivers/staging/lustre/lnet/lnet/lib-md.c
index 13f4332..c858b59 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-md.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-md.c
@@ -125,7 +125,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
if ((umd-options  LNET_MD_MAX_SIZE) != 0  /*max size used*/
(umd-max_size  0 ||
-umd-max_size  total_length)) // illegal max_size
+umd-max_size  total_length)) /* illegal max_size */
return -EINVAL;
 
} else if ((umd-options  LNET_MD_KIOV) != 0) {
@@ -146,7 +146,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
if ((umd-options  LNET_MD_MAX_SIZE) != 0  /*max size used*/
(umd-max_size  0 ||
-umd-max_size  total_length)) // illegal max_size
+umd-max_size  total_length)) /* illegal max_size */
return -EINVAL;
} else {   /* contiguous */
lmd-md_length = umd-length;
@@ -156,7 +156,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
if ((umd-options  LNET_MD_MAX_SIZE) != 0  /*max size used*/
(umd-max_size  0 ||
-umd-max_size  (int)umd-length)) // illegal max_size
+umd-max_size  (int)umd-length)) /* illegal max_size */
return -EINVAL;
}
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv1 4/4] staging:lustre:lnet lib-md.c erase space before ')' for code style

2014-08-30 Thread Janet Liu
Silences the following error:
  ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Janet Liu jianhua@gmail.com
---
 drivers/staging/lustre/lnet/lnet/lib-md.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c 
b/drivers/staging/lustre/lnet/lnet/lib-md.c
index c858b59..782b01c 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-md.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-md.c
@@ -136,7 +136,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
for (i = 0; i  (int)niov; i++) {
/* We take the page pointer on trust */
if (lmd-md_iov.kiov[i].kiov_offset +
-   lmd-md_iov.kiov[i].kiov_len  PAGE_CACHE_SIZE )
+   lmd-md_iov.kiov[i].kiov_len  PAGE_CACHE_SIZE)
return -EINVAL; /* invalid length */
 
total_length += lmd-md_iov.kiov[i].kiov_len;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: bcm: LeakyBucket: format kernel-docs

2014-08-30 Thread Matthias Beyer
On 29-08-2014 21:50:16, Andrew Plummer wrote:
 Remove insignificant spaces before tabs in comments.
 
 Signed-off-by: Andrew Plummer plummer...@gmail.com
 ---
  drivers/staging/bcm/LeakyBucket.c | 81 
 ---
  1 file changed, 33 insertions(+), 48 deletions(-)
 
 diff --git a/drivers/staging/bcm/LeakyBucket.c 
 b/drivers/staging/bcm/LeakyBucket.c
 index 8c4030d..d6b55f9 100644
 --- a/drivers/staging/bcm/LeakyBucket.c
 +++ b/drivers/staging/bcm/LeakyBucket.c
 @@ -1,20 +1,16 @@
  /**
 -*LEAKYBUCKET.C
 +*LEAKYBUCKET.C
  *This file contains the routines related to Leaky Bucket Algorithm.
  ***/
  #include headers.h
  
 -/*
 -* Function- UpdateTokenCount()
 -*
 -* Description - This function calculates the token count for each
 -*channel and updates the same in Adapter 
 strucuture.
 -*
 -* Parameters  - Adapter: Pointer to the Adapter structure.
 -*
 -* Returns - None
 -**/
 -
 +/**
 + * UpdateTokenCount() - Calculates the token count for each channel
 + * and updates the same in Adapter structure
 + * @Adapter: Pointer to the Adapter structure.
 + *
 + * Return: None
 + */
  static VOID UpdateTokenCount(register struct bcm_mini_adapter *Adapter)
  {
   ULONG liCurrentTime;
 @@ -59,20 +55,16 @@ static VOID UpdateTokenCount(register struct 
 bcm_mini_adapter *Adapter)
  }
  
  
 -/*
 -* Function- IsPacketAllowedForFlow()
 -*
 -* Description - This function checks whether the given packet from the
 -*specified queue can be allowed for transmission 
 by
 -*checking the token count.
 -*
 -* Parameters  - Adapter: Pointer to the Adpater structure.
 -*  - iQIndex   : The queue Identifier.
 -*  - ulPacketLength: Number of bytes to be 
 transmitted.
 -*
 -* Returns - The number of bytes allowed for transmission.
 -*
 -***/
 +/**
 + * IsPacketAllowedForFlow() - This function checks whether the given
 + * packet from the specified queue can be allowed for transmission by
 + * checking the token count.
 + * @Adapter: Pointer to the Adpater structure.
 + * @iQIndex: The queue Identifier.
 + * @ulPacketLength:  Number of bytes to be transmitted.
 + *
 + * Returns: The number of bytes allowed for transmission.
 + */
  static ULONG GetSFTokenCount(struct bcm_mini_adapter *Adapter, struct 
 bcm_packet_info *psSF)
  {
   BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL,
 @@ -256,18 +248,14 @@ static void send_control_packet(struct bcm_mini_adapter 
 *ad,
   }
  }
  
 -/
 -* Function- CheckAndSendPacketFromIndex()
 -*
 -* Description - This function dequeues the data/control packet from the
 -*specified queue for transmission.
 -*
 -* Parameters  - Adapter : Pointer to the driver control structure.
 -*  - iQIndex : The queue Identifier.
 -*
 -* Returns - None.
 -*
 -/
 +/**
 + * CheckAndSendPacketFromIndex() - This function dequeues the
 + * data/control packet from the specified queue for transmission.
 + * @Adapter: Pointer to the driver control structure.
 + * @iQIndex: The queue Identifier.
 + *
 + * Returns: None.
 + */
  static VOID CheckAndSendPacketFromIndex(struct bcm_mini_adapter *Adapter,
   struct bcm_packet_info *psSF)
  {
 @@ -284,16 +272,13 @@ static VOID CheckAndSendPacketFromIndex(struct 
 bcm_mini_adapter *Adapter,
  }
  
  
 -/***
 -* Function- transmit_packets()
 -*
 -* Description - This function transmits the packets from different
 -*queues, if free descriptors are available on 
 target.
 -*
 -* Parameters  - Adapter:  Pointer to the Adapter structure.
 -*
 -* Returns - None.
 -/
 +/**
 + * transmit_packets() - This function transmits the packets from
 + * different queues, if free descriptors are available on target.
 + * @Adapter: Pointer to the Adapter structure.
 + *
 + * Returns: None.
 + */
  VOID transmit_packets(struct bcm_mini_adapter *Adapter)
  {
   UINT uiPrevTotalCount = 0;
 -- 
 1.9.1
 
 ___
 devel mailing list
 de...@linuxdriverproject.org
 

Re: [PATCH 1/3] staging: iio: light: isl29018: fix typo

2014-08-30 Thread Jonathan Cameron
On 29/08/14 15:26, Laurentiu Palcu wrote:
 isl29108 was used, instead of isl29018.
 
 Signed-off-by: Laurentiu Palcu laurentiu.pa...@intel.com
Applied to the togreg branch of iio.git - initially pushed out as testing for 
the
autobuilders to play.

Thanks,

Jonathan
 ---
  drivers/staging/iio/light/isl29018.c | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/staging/iio/light/isl29018.c 
 b/drivers/staging/iio/light/isl29018.c
 index 86cc8f9..63c70be 100644
 --- a/drivers/staging/iio/light/isl29018.c
 +++ b/drivers/staging/iio/light/isl29018.c
 @@ -447,7 +447,7 @@ static struct attribute *isl29018_attributes[] = {
   NULL
  };
  
 -static const struct attribute_group isl29108_group = {
 +static const struct attribute_group isl29018_group = {
   .attrs = isl29018_attributes,
  };
  
 @@ -510,8 +510,8 @@ static int isl29018_chip_init(struct isl29018_chip *chip)
   return 0;
  }
  
 -static const struct iio_info isl29108_info = {
 - .attrs = isl29108_group,
 +static const struct iio_info isl29018_info = {
 + .attrs = isl29018_group,
   .driver_module = THIS_MODULE,
   .read_raw = isl29018_read_raw,
   .write_raw = isl29018_write_raw,
 @@ -579,7 +579,7 @@ static int isl29018_probe(struct i2c_client *client,
   if (err)
   return err;
  
 - indio_dev-info = isl29108_info;
 + indio_dev-info = isl29018_info;
   indio_dev-channels = isl29018_channels;
   indio_dev-num_channels = ARRAY_SIZE(isl29018_channels);
   indio_dev-name = id-name;
 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/3] staging: iio: light: isl29018: add support for isl29023 and isl29035

2014-08-30 Thread Jonathan Cameron
On 29/08/14 15:26, Laurentiu Palcu wrote:
 Intersil chips ISL29018, ISL29023 and ISL29035 are very similar. They're
 all ambience light sensors. The ISL29018, however, is also a proximity
 sensor. The registers are similar too:

 -+--+--
 AVAILABLE IN | ADDR REG | NAME
290xx |  |
 -+--+--
  18/23/35|   00h| COMMANDI
  18/23/35|   01h| COMMANDII (B4-7 are used only in 29018 for 
 proximity)
  18/23/35|   02h| DATALSB
  18/23/35|   03h| DATAMSB
  18/23/35|   04h| INT_LT_LSB
  18/23/35|   05h| INT_LT_MSB
  18/23/35|   06h| INT_HT_LSB
  18/23/35|   07h| INT_HT_MSB
 18/23|   08h| TEST
35|   0Fh| ID
 -+--+---

 So, this patch will add support for ISL29023 and ISL29035 to the
 existing isl29018 driver. Since these 2 chips don't have proximity
 detection, the proximity sysfs attribute is not needed.

 Also, for ISL29035, since it has an ID register, make use of it in order
 to properly detect the chip and clear the brownout bit.

 Signed-off-by: Laurentiu Palcu laurentiu.pa...@intel.com
Hmm.  Your changes look good.  This driver still has quite a lot of non
standard ABI, but fair enough that you haven't dealt with that in this
patch.

Don't suppose you are interested in cleaning this up and getting the
driver out of staging?

Applied to the togreg branch of iio.git

Thanks,

Jonathan
 ---
  drivers/staging/iio/light/isl29018.c | 163 
 ++-
  1 file changed, 141 insertions(+), 22 deletions(-)

 diff --git a/drivers/staging/iio/light/isl29018.c 
 b/drivers/staging/iio/light/isl29018.c
 index 63c70be..b50f126 100644
 --- a/drivers/staging/iio/light/isl29018.c
 +++ b/drivers/staging/iio/light/isl29018.c
 @@ -1,5 +1,5 @@
  /*
 - * A iio driver for the light sensor ISL 29018.
 + * A iio driver for the light sensor ISL 29018/29023/29035.
   *
   * IIO driver for monitoring ambient light intensity in luxi, proximity
   * sensing and infrared sensing.
 @@ -58,10 +58,18 @@
  #define ISL29018_TEST_SHIFT  0
  #define ISL29018_TEST_MASK   (0xFF  ISL29018_TEST_SHIFT)

 +#define ISL29035_REG_DEVICE_ID   0x0F
 +#define ISL29035_DEVICE_ID_SHIFT 0x03
 +#define ISL29035_DEVICE_ID_MASK  (0x7  
 ISL29035_DEVICE_ID_SHIFT)
 +#define ISL29035_DEVICE_ID   0x5
 +#define ISL29035_BOUT_SHIFT  0x07
 +#define ISL29035_BOUT_MASK   (0x01  ISL29035_BOUT_SHIFT)
 +
  struct isl29018_chip {
   struct device   *dev;
   struct regmap   *regmap;
   struct mutexlock;
 + int type;
   unsigned intlux_scale;
   unsigned intlux_uscale;
   unsigned intrange;
 @@ -407,23 +415,35 @@ static int isl29018_read_raw(struct iio_dev *indio_dev,
   return ret;
  }

 +#define ISL29018_LIGHT_CHANNEL { \
 + .type = IIO_LIGHT,  \
 + .indexed = 1,   \
 + .channel = 0,   \
 + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |\
 + BIT(IIO_CHAN_INFO_CALIBSCALE),  \
 +}
 +
 +#define ISL29018_IR_CHANNEL {
 \
 + .type = IIO_INTENSITY,  \
 + .modified = 1,  \
 + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),   \
 + .channel2 = IIO_MOD_LIGHT_IR,   \
 +}
 +
 +#define ISL29018_PROXIMITY_CHANNEL { \
 + .type = IIO_PROXIMITY,  \
 + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),   \
 +}
 +
  static const struct iio_chan_spec isl29018_channels[] = {
 - {
 - .type = IIO_LIGHT,
 - .indexed = 1,
 - .channel = 0,
 - .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |
 - BIT(IIO_CHAN_INFO_CALIBSCALE),
 - }, {
 - .type = IIO_INTENSITY,
 - .modified = 1,
 - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
 - .channel2 = IIO_MOD_LIGHT_IR,
 - }, {
 - /* Unindexed in current ABI.  But perhaps it should be. */
 - .type = IIO_PROXIMITY,
 - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
 - }
 + ISL29018_LIGHT_CHANNEL,
 + ISL29018_IR_CHANNEL,
 + ISL29018_PROXIMITY_CHANNEL,
 +};
 +
 +static const struct iio_chan_spec isl29023_channels[] = {
 + ISL29018_LIGHT_CHANNEL,
 + ISL29018_IR_CHANNEL,
  };

  static IIO_DEVICE_ATTR(range, S_IRUGO | S_IWUSR, show_range, store_range, 0);
 @@ -447,16 +467,63 @@ 

Re: [PATCH 3/3] staging: iio: light: isl29018: add ACPI support

2014-08-30 Thread Jonathan Cameron
On 29/08/14 15:26, Laurentiu Palcu wrote:
 Add support for enumerating the device through ACPI.

 Signed-off-by: Laurentiu Palcu laurentiu.pa...@intel.com
Mostly fine, but I'm unclear on why we have a cast to a char * for name.

Maybe I just haven't had enough coffee this morning :)

Jonathan
 ---
  drivers/staging/iio/light/isl29018.c | 46 
 +++-
  1 file changed, 40 insertions(+), 6 deletions(-)

 diff --git a/drivers/staging/iio/light/isl29018.c 
 b/drivers/staging/iio/light/isl29018.c
 index b50f126..c54c6ae 100644
 --- a/drivers/staging/iio/light/isl29018.c
 +++ b/drivers/staging/iio/light/isl29018.c
 @@ -30,6 +30,7 @@
  #include linux/slab.h
  #include linux/iio/iio.h
  #include linux/iio/sysfs.h
 +#include linux/acpi.h

  #define CONVERSION_TIME_MS   100

 @@ -656,12 +657,28 @@ static const struct chip_info chip_info_tbl[] = {
   },
  };

 +static char *isl29018_match_acpi_device(struct device *dev, int *data)
 +{
 + const struct acpi_device_id *id;
 +
 + id = acpi_match_device(dev-driver-acpi_match_table, dev);
 +
 + if (!id)
 + return NULL;
 +
 + *data = (int) id-driver_data;
 +
 + return (char *) dev_name(dev);
Silly question, but what is wrong with const char * as the return type?
Where this name ultimately ends up is a const char * anyway so you cast
the const away and then back again.
 +}
 +
  static int isl29018_probe(struct i2c_client *client,
const struct i2c_device_id *id)
  {
   struct isl29018_chip *chip;
   struct iio_dev *indio_dev;
   int err;
 + char *name = NULL;
const char *

 + int dev_id = 0;

   indio_dev = devm_iio_device_alloc(client-dev, sizeof(*chip));
   if (indio_dev == NULL) {
 @@ -673,9 +690,17 @@ static int isl29018_probe(struct i2c_client *client,
   i2c_set_clientdata(client, indio_dev);
   chip-dev = client-dev;

 + if (id) {
 + name = (char *) id-name;
 + dev_id = id-driver_data;
 + }
 +
 + if (ACPI_HANDLE(client-dev))
 + name = isl29018_match_acpi_device(client-dev, dev_id);
 +
   mutex_init(chip-lock);

 - chip-type = id-driver_data;
 + chip-type = dev_id;
   chip-lux_scale = 1;
   chip-lux_uscale = 0;
   chip-range = 1000;
 @@ -683,7 +708,7 @@ static int isl29018_probe(struct i2c_client *client,
   chip-suspended = false;

   chip-regmap = devm_regmap_init_i2c(client,
 - chip_info_tbl[id-driver_data].regmap_cfg);
 + chip_info_tbl[dev_id].regmap_cfg);
   if (IS_ERR(chip-regmap)) {
   err = PTR_ERR(chip-regmap);
   dev_err(chip-dev, regmap initialization failed: %d\n, err);
 @@ -694,10 +719,10 @@ static int isl29018_probe(struct i2c_client *client,
   if (err)
   return err;

 - indio_dev-info = chip_info_tbl[id-driver_data].indio_info;
 - indio_dev-channels = chip_info_tbl[id-driver_data].channels;
 - indio_dev-num_channels = chip_info_tbl[id-driver_data].num_channels;
 - indio_dev-name = id-name;
 + indio_dev-info = chip_info_tbl[dev_id].indio_info;
 + indio_dev-channels = chip_info_tbl[dev_id].channels;
 + indio_dev-num_channels = chip_info_tbl[dev_id].num_channels;
 + indio_dev-name = name;
   indio_dev-dev.parent = client-dev;
   indio_dev-modes = INDIO_DIRECT_MODE;
   err = devm_iio_device_register(client-dev, indio_dev);
 @@ -747,6 +772,14 @@ static SIMPLE_DEV_PM_OPS(isl29018_pm_ops, 
 isl29018_suspend, isl29018_resume);
  #define ISL29018_PM_OPS NULL
  #endif

 +static const struct acpi_device_id isl29018_acpi_match[] = {
 + {ISL29018, isl29018},
 + {ISL29023, isl29023},
 + {ISL29035, isl29035},
 + {},
 +};
 +MODULE_DEVICE_TABLE(acpi, isl29018_acpi_match);
 +
  static const struct i2c_device_id isl29018_id[] = {
   {isl29018, isl29018},
   {isl29023, isl29023},
 @@ -768,6 +801,7 @@ static struct i2c_driver isl29018_driver = {
   .class  = I2C_CLASS_HWMON,
   .driver  = {
   .name = isl29018,
 + .acpi_match_table = ACPI_PTR(isl29018_acpi_match),
   .pm = ISL29018_PM_OPS,
   .owner = THIS_MODULE,
   .of_match_table = isl29018_of_match,

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: comedi: usbdux: fix sparse endianness warnings

2014-08-30 Thread Ian Abbott

On 30/08/14 02:40, Chase Southwood wrote:

Sparse has many warnings like:

drivers/staging/comedi/drivers/usbdux.c:366:32: warning: cast to
restricted __le16

on lines on which devpriv-in_buf or devpriv-insn_buf are passed to
le16_to_cpu().  This suggests that both of these variables should actually
be of type __le16.

Signed-off-by: Chase Southwood chase.southw...@gmail.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: H Hartley Sweeten hswee...@visionengravers.com
---
This is, as usual, compile tested only.  I tried to verify as best as I
could that this is a sane change, but I am unable to test on the hardware.

  drivers/staging/comedi/drivers/usbdux.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbdux.c 
b/drivers/staging/comedi/drivers/usbdux.c
index 053bc50..e1a19222 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -198,9 +198,9 @@ struct usbdux_private {
/* size of the PWM buffer which holds the bit pattern */
int pwm_buf_sz;
/* input buffer for the ISO-transfer */
-   uint16_t *in_buf;
+   __le16 *in_buf;
/* input buffer for single insn */
-   uint16_t *insn_buf;
+   __le16 *insn_buf;

unsigned int ao_readback[USBDUX_NUM_AO_CHAN];




That seems fine.  Perhaps the variable 'p' in usbdux_ao_insn_write() 
should also be of type '__le16 *'?


Reviewed-by: Ian Abbott abbo...@mev.co.uk

--
-=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk)=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: comedi: addi_apci_1564: move boilerplate text to addi_apci_1564.c

2014-08-30 Thread Ian Abbott

On 30/08/14 06:55, Chase Southwood wrote:

Signed-off-by: Chase Southwood chase.southw...@gmail.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: H Hartley Sweeten hswee...@visionengravers.com
---
  .../comedi/drivers/addi-data/hwdrv_apci1564.c  | 23 --
  drivers/staging/comedi/drivers/addi_apci_1564.c| 23 ++
  2 files changed, 23 insertions(+), 23 deletions(-)


Reviewed-by: Ian Abbott abbo...@mev.co.uk

--
-=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk)=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv1 1/4] staging:lustre:lnet: lib-md.c make line not over 80 characters

2014-08-30 Thread Dan Carpenter
On Sat, Aug 30, 2014 at 02:52:55PM +0800, Janet Liu wrote:
 @@ -121,7 +123,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int 
 unlink)
  
   lmd-md_length = total_length;
  
 - if ((umd-options  LNET_MD_MAX_SIZE) != 0  /* max size used 
 */
 + if ((umd-options  LNET_MD_MAX_SIZE) != 0  /*max size used*/

Better to go over the 80 character limit than to mangle it this way.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8188eu: Add missing include to pick up prototype

2014-08-30 Thread Max Vozeler
This fixes the following sparse warning:

drivers/staging/rtl8188eu/hal/HalHWImg8188E_MAC.c:119:6: warning: symbol
'rtl88e_phy_mac_config' was not declared. Should it be static?

Signed-off-by: Max Vozeler m...@hinterhof.net
---
 drivers/staging/rtl8188eu/hal/HalHWImg8188E_MAC.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rtl8188eu/hal/HalHWImg8188E_MAC.c 
b/drivers/staging/rtl8188eu/hal/HalHWImg8188E_MAC.c
index ccca6a4..28bb275 100644
--- a/drivers/staging/rtl8188eu/hal/HalHWImg8188E_MAC.c
+++ b/drivers/staging/rtl8188eu/hal/HalHWImg8188E_MAC.c
@@ -19,6 +19,7 @@
 **/
 
 #include odm_precomp.h
+#include phy.h
 #include rtw_iol.h
 
 /* MAC_REG.TXT */
-- 
2.1.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: lustre: llite: expand the GOTO macro

2014-08-30 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
identifier lbl;
@@

if (...)
  GOTO(lbl,...);
+else
GOTO(lbl,...);

@@
identifier lbl,rc;
constant c;
expression e,e1;
@@

if (
-   e
+   !e
   )
-  GOTO(lbl,\(rc\|c\));
-else GOTO(lbl,e1);
+  e1;
+goto lbl;

@@
identifier lbl,rc;
constant c;
expression e,e1;
@@

if (e)
-  GOTO(lbl,e1);
-else GOTO(lbl,\(rc\|c\));
+  e1;
+goto lbl;

@@
identifier lbl;
expression e,e1,e2;
@@

if (e)
-  GOTO(lbl,e1);
-else GOTO(lbl,e2);
+  e1;
+else e2;
+goto lbl;

// 

@@
identifier lbl,rc;
constant c;
@@

- GOTO(lbl,\(rc\|c\));
+ goto lbl;

@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
+ rc;
+ goto lbl;
// /smpl

The rules above the line deal with the case where the goto desination is
the same whether or not the the branch is taken.  In that case, the goto is
created in just one instance after the if.  This affects only the files
namei.c and llite_lib.c.

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
 drivers/staging/lustre/lustre/llite/dir.c |  171 -
 drivers/staging/lustre/lustre/llite/file.c|  274 +-
 drivers/staging/lustre/lustre/llite/llite_capa.c  |2 
 drivers/staging/lustre/lustre/llite/llite_close.c |   10 
 drivers/staging/lustre/lustre/llite/llite_lib.c   |  110 +---
 drivers/staging/lustre/lustre/llite/llite_mmap.c  |8 
 drivers/staging/lustre/lustre/llite/llite_nfs.c   |   12 
 drivers/staging/lustre/lustre/llite/lloop.c   |   48 ++-
 drivers/staging/lustre/lustre/llite/lproc_llite.c |   39 +--
 drivers/staging/lustre/lustre/llite/namei.c   |   53 ++--
 drivers/staging/lustre/lustre/llite/remote_perm.c |6 
 drivers/staging/lustre/lustre/llite/rw.c  |   22 +
 drivers/staging/lustre/lustre/llite/rw26.c|2 
 drivers/staging/lustre/lustre/llite/statahead.c   |   66 +++--
 drivers/staging/lustre/lustre/llite/symlink.c |   11 
 drivers/staging/lustre/lustre/llite/vvp_io.c  |   14 -
 drivers/staging/lustre/lustre/llite/xattr.c   |   51 ++--
 drivers/staging/lustre/lustre/llite/xattr_cache.c |   22 +
 18 files changed, 576 insertions(+), 345 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/dir.c 
b/drivers/staging/lustre/lustre/llite/dir.c
index de5892c..e5d31f4 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -398,7 +398,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
if (IS_ERR(page)) {
CERROR(dir page locate: DFID at %llu: rc %ld\n,
   PFID(ll_inode2fid(dir)), lhash, PTR_ERR(page));
-   GOTO(out_unlock, page);
+   goto out_unlock;
} else if (page != NULL) {
/*
 * XXX nikita: not entirely correct handling of a corner case:
@@ -414,7 +414,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
 * it as an overflow page. 1. invalidate all pages at
 * once. 2. use HASH|1 as an index for P1.
 */
-   GOTO(hash_collision, page);
+   goto hash_collision;
}
 
page = read_cache_page(mapping, hash_x_index(hash, hash64),
@@ -422,7 +422,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
if (IS_ERR(page)) {
CERROR(read cache page: DFID at %llu: rc %ld\n,
   PFID(ll_inode2fid(dir)), hash, PTR_ERR(page));
-   GOTO(out_unlock, page);
+   goto out_unlock;
}
 
wait_on_page_locked(page);
@@ -604,11 +604,13 @@ static int ll_readdir(struct file *filp, struct 
dir_context *ctx)
32bit_api %d\n, inode-i_ino, inode-i_generation,
   inode, (unsigned long)lfd-lfd_pos, i_size_read(inode), api32);
 
-   if (lfd-lfd_pos == MDS_DIR_END_OFF)
+   if (lfd-lfd_pos == MDS_DIR_END_OFF) {
/*
 * end-of-file.
 */
-   GOTO(out, rc = 0);
+   rc = 0;
+   goto out;
+   }
 
ctx-pos = lfd-lfd_pos;
rc = ll_dir_read(inode, ctx);
@@ -663,8 +665,10 @@ int ll_dir_setdirstripe(struct inode *dir, struct 
lmv_user_md *lump,
op_data = ll_prep_md_op_data(NULL, dir, NULL, filename,
 strlen(filename), mode, LUSTRE_OPC_MKDIR,
 lump);
-   if (IS_ERR(op_data))
-   GOTO(err_exit, err = PTR_ERR(op_data));
+   if (IS_ERR(op_data)) {
+   err = PTR_ERR(op_data);
+   goto err_exit;
+   }
 
op_data-op_cli_flags |= CLI_SET_MEA;
err = md_create(sbi-ll_md_exp, op_data, lump, sizeof(*lump), mode,
@@ -673,7 +677,7 @@ int ll_dir_setdirstripe(struct inode *dir, struct 
lmv_user_md *lump,
  

[PATCH] staging: lustre: fid,fld: expand the GOTO macro

2014-08-30 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
identifier lbl;
identifier rc;
constant c;
@@

- GOTO(lbl,\(rc\|c\));
+ goto lbl;

@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
+ rc;
+ goto lbl;
// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
 drivers/staging/lustre/lustre/fid/fid_request.c |   18 +++---
 drivers/staging/lustre/lustre/fld/fld_request.c |   14 --
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c 
b/drivers/staging/lustre/lustre/fid/fid_request.c
index 46c11ca..64b1d80 100644
--- a/drivers/staging/lustre/lustre/fid/fid_request.c
+++ b/drivers/staging/lustre/lustre/fid/fid_request.c
@@ -113,7 +113,7 @@ static int seq_client_rpc(struct lu_client_seq *seq,
if (seq-lcs_type == LUSTRE_SEQ_METADATA)
mdc_put_rpc_lock(exp-exp_obd-u.cli.cl_rpc_lock, NULL);
if (rc)
-   GOTO(out_req, rc);
+   goto out_req;
 
out = req_capsule_server_get(req-rq_pill, RMF_SEQ_RANGE);
*output = *out;
@@ -121,13 +121,15 @@ static int seq_client_rpc(struct lu_client_seq *seq,
if (!range_is_sane(output)) {
CERROR(%s: Invalid range received from server: 
   DRANGE\n, seq-lcs_name, PRANGE(output));
-   GOTO(out_req, rc = -EINVAL);
+   rc = -EINVAL;
+   goto out_req;
}
 
if (range_is_exhausted(output)) {
CERROR(%s: Range received from server is exhausted: 
   DRANGE]\n, seq-lcs_name, PRANGE(output));
-   GOTO(out_req, rc = -EINVAL);
+   rc = -EINVAL;
+   goto out_req;
}
 
CDEBUG_LIMIT(debug_mask, %s: Allocated %s-sequence DRANGE]\n,
@@ -430,7 +432,7 @@ static int seq_client_proc_init(struct lu_client_seq *seq)
if (rc) {
CERROR(%s: Can't init sequence manager proc, rc %d\n,
   seq-lcs_name, rc);
-   GOTO(out_cleanup, rc);
+   goto out_cleanup;
}
 
return 0;
@@ -508,8 +510,10 @@ int client_fid_init(struct obd_device *obd,
return -ENOMEM;
 
OBD_ALLOC(prefix, MAX_OBD_NAME + 5);
-   if (prefix == NULL)
-   GOTO(out_free_seq, rc = -ENOMEM);
+   if (prefix == NULL) {
+   rc = -ENOMEM;
+   goto out_free_seq;
+   }
 
snprintf(prefix, MAX_OBD_NAME + 5, cli-%s, obd-obd_name);
 
@@ -517,7 +521,7 @@ int client_fid_init(struct obd_device *obd,
rc = seq_client_init(cli-cl_seq, exp, type, prefix, NULL);
OBD_FREE(prefix, MAX_OBD_NAME + 5);
if (rc)
-   GOTO(out_free_seq, rc);
+   goto out_free_seq;
 
return rc;
 out_free_seq:
diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 4539a02..f63c669 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -293,7 +293,7 @@ static int fld_client_proc_init(struct lu_client_fld *fld)
if (rc) {
CERROR(%s: Can't init FLD proc, rc %d\n,
   fld-lcf_name, rc);
-   GOTO(out_cleanup, rc);
+   goto out_cleanup;
}
 
return 0;
@@ -363,12 +363,12 @@ int fld_client_init(struct lu_client_fld *fld,
if (IS_ERR(fld-lcf_cache)) {
rc = PTR_ERR(fld-lcf_cache);
fld-lcf_cache = NULL;
-   GOTO(out, rc);
+   goto out;
}
 
rc = fld_client_proc_init(fld);
if (rc)
-   GOTO(out, rc);
+   goto out;
 out:
if (rc)
fld_client_fini(fld);
@@ -441,11 +441,13 @@ int fld_client_rpc(struct obd_export *exp,
if (fld_op != FLD_LOOKUP)
mdc_put_rpc_lock(exp-exp_obd-u.cli.cl_rpc_lock, NULL);
if (rc)
-   GOTO(out_req, rc);
+   goto out_req;
 
prange = req_capsule_server_get(req-rq_pill, RMF_FLD_MDFLD);
-   if (prange == NULL)
-   GOTO(out_req, rc = -EFAULT);
+   if (prange == NULL) {
+   rc = -EFAULT;
+   goto out_req;
+   }
*range = *prange;
 out_req:
ptlrpc_req_finished(req);

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: nokia_h4p: nokia_fw: remove extra return

2014-08-30 Thread Andrew Plummer
Remove empty return at end of function.

Signed-off-by: Andrew Plummer plummer...@gmail.com
---
 drivers/staging/nokia_h4p/nokia_fw.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/nokia_h4p/nokia_fw.c 
b/drivers/staging/nokia_h4p/nokia_fw.c
index 14ba219..18953ae 100644
--- a/drivers/staging/nokia_h4p/nokia_fw.c
+++ b/drivers/staging/nokia_h4p/nokia_fw.c
@@ -197,8 +197,6 @@ void hci_h4p_parse_fw_event(struct hci_h4p_info *info, 
struct sk_buff *skb)
dev_err(info-dev, Don't know how to parse fw event\n);
info-fw_error = -EINVAL;
}
-
-   return;
 }
 
 MODULE_FIRMWARE(FW_NAME_TI1271_PRELE);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8821ae: hal_bt_coexist: fix coding style issue

2014-08-30 Thread An Ha
Fix coding style issues, these changes include:
-Add space between if and brackets
-Add space after comma in an argument
-Add space between equal sign to separate the variable and the assignment
-Remove unnecessary curly braces around one-line if statements
-Remove unnecessary whitespace between two brackets
-Remove unnecessary whitespace before newline
-Join else-if statement onto same line as end curly brace
-Join open curly brace onto same line as if statement
-Use foo * instead of foo* for the pointer placement
-Switch commenting style from C99 comments to C89 comments

Signed-off-by: An Ha zero579...@gmail.com
---
 .../staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c   | 102 ++---
 1 file changed, 49 insertions(+), 53 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c 
b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
index 8bee772..293bf9d 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
@@ -43,13 +43,13 @@ void rtl8821ae_dm_bt_reject_ap_aggregated_packet(struct 
ieee80211_hw *hw, bool b
struct rtl_priv rtlpriv = rtl_priv(hw);
PRX_TS_RECORD   pRxTs = NULL;
 
-   if(b_reject){
-   // Do not allow receiving A-MPDU aggregation.
+   if (b_reject) {
+   /* Do not allow receiving A-MPDU aggregation. */
if (rtlpriv-mac80211.vendor == PEER_CISCO) {
if (pHTInfo-bAcceptAddbaReq) {
-   RTPRINT(FBT, BT_TRACE, (BT_Disallow 
AMPDU \n));
+   RTPRINT(FBT, BT_TRACE, (BT_Disallow 
AMPDU\n));
pHTInfo-bAcceptAddbaReq = FALSE;
-   if(GetTs(Adapter, 
(PTS_COMMON_INFO*)(pRxTs), pMgntInfo-Bssid, 0, RX_DIR, FALSE))
+   if (GetTs(Adapter, (PTS_COMMON_INFO 
*)(pRxTs), pMgntInfo-Bssid, 0, RX_DIR, FALSE))
TsInitDelBA(Adapter, 
(PTS_COMMON_INFO)pRxTs, RX_DIR);
}
} else {
@@ -59,9 +59,9 @@ void rtl8821ae_dm_bt_reject_ap_aggregated_packet(struct 
ieee80211_hw *hw, bool b
}
}
} else {
-   if(rtlpriv-mac80211.vendor == PEER_CISCO) {
+   if (rtlpriv-mac80211.vendor == PEER_CISCO) {
if (!pHTInfo-bAcceptAddbaReq) {
-   RTPRINT(FBT, BT_TRACE, (BT_Allow AMPDU 
\n));
+   RTPRINT(FBT, BT_TRACE, (BT_Allow 
AMPDU\n));
pHTInfo-bAcceptAddbaReq = TRUE;
}
}
@@ -78,17 +78,15 @@ struct rtl_phy *rtlphy = (rtlpriv-phy);
 if (rtlpriv-link_info.b_busytraffic) {
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_IDLE;
 
-   if(rtlpriv-link_info.b_tx_busy_traffic) {
+   if (rtlpriv-link_info.b_tx_busy_traffic)
rtlpcipriv-btcoexist.current_state |= 
BT_COEX_STATE_WIFI_UPLINK;
-   } else {
+   else
rtlpcipriv-btcoexist.current_state = 
~BT_COEX_STATE_WIFI_UPLINK;
-   }
 
-   if(rtlpriv-link_info.b_rx_busy_traffic) {
+   if (rtlpriv-link_info.b_rx_busy_traffic)
rtlpcipriv-btcoexist.current_state |= 
BT_COEX_STATE_WIFI_DOWNLINK;
-   } else {
+   else
rtlpcipriv-btcoexist.current_state = 
~BT_COEX_STATE_WIFI_DOWNLINK;
-   }
 } else {
rtlpcipriv-btcoexist.current_state |= BT_COEX_STATE_WIFI_IDLE;
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_UPLINK;
@@ -102,7 +100,7 @@ if (rtlpriv-mac80211.mode == WIRELESS_MODE_G
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_HT40;
 } else {
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_LEGACY;
-   if(rtlphy-current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
+   if (rtlphy-current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
rtlpcipriv-btcoexist.current_state |= BT_COEX_STATE_WIFI_HT40;
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_HT20;
} else {
@@ -111,12 +109,11 @@ if (rtlpriv-mac80211.mode == WIRELESS_MODE_G
}
 }
 
-if (bt_operation_on) {
+if (bt_operation_on)
rtlpcipriv-btcoexist.current_state |= BT_COEX_STATE_BT30;
-} else {
+else
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_BT30;
 }
-}
 
 
 u8 rtl8821ae_dm_bt_check_coex_rssi_state1(struct ieee80211_hw *hw,
@@ -130,12 +127,12 @@ u8 rtl8821ae_dm_bt_check_coex_rssi_state1(struct 
ieee80211_hw *hw,
 
undecoratedsmoothed_pwdb =  rtl8821ae_dm_bt_get_rx_ss(hw);
 
-   if(level_num == 2) {
+   if (level_num == 2) {
rtlpcipriv-btcoexist.current_state = 

[PATCH] Staging: emxx_udc: emxx_udc: remove spaces before semicolons

2014-08-30 Thread Andrew Plummer
Remove spaces before semicolons to remove checkpatch warnings.

Signed-off-by: Andrew Plummer plummer...@gmail.com
---
 drivers/staging/emxx_udc/emxx_udc.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c 
b/drivers/staging/emxx_udc/emxx_udc.c
index b2eaf01..adc24a9 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -77,14 +77,14 @@ struct nbu2ss_udc udc_controller;
 /* Read */
 static inline u32 _nbu2ss_readl(void *address)
 {
-   return __raw_readl(address) ;
+   return __raw_readl(address);
 }
 
 /*-*/
 /* Write */
 static inline void _nbu2ss_writel(void *address, u32 udata)
 {
-   __raw_writel(udata, address) ;
+   __raw_writel(udata, address);
 }
 
 /*-*/
@@ -92,7 +92,7 @@ static inline void _nbu2ss_writel(void *address, u32 udata)
 static inline void _nbu2ss_bitset(void *address, u32 udata)
 {
u32 reg_dt = __raw_readl(address) | (udata);
-   __raw_writel(reg_dt, address) ;
+   __raw_writel(reg_dt, address);
 }
 
 /*-*/
@@ -100,7 +100,7 @@ static inline void _nbu2ss_bitset(void *address, u32 udata)
 static inline void _nbu2ss_bitclr(void *address, u32 udata)
 {
u32 reg_dt = __raw_readl(address)  ~(udata);
-   __raw_writel(reg_dt, address) ;
+   __raw_writel(reg_dt, address);
 }
 
 #ifdef UDC_DEBUG_DUMP
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 09/10] lustre: Add MAINTAINERS entry

2014-08-30 Thread Greg Kroah-Hartman
On Sun, Aug 17, 2014 at 12:47:57PM -0400, Oleg Drokin wrote:
 
 On Aug 17, 2014, at 12:37 PM, Greg Kroah-Hartman wrote:
 
  On Fri, Aug 15, 2014 at 12:48:14PM -0400, Oleg Drokin wrote:
  Just add the entry with some info.
  
  Signed-off-by: Oleg Drokin gr...@linuxhacker.ru
  ---
  MAINTAINERS | 8 
  1 file changed, 8 insertions(+)
  
  diff --git a/MAINTAINERS b/MAINTAINERS
  index 7e2eb4c..369183b 100644
  --- a/MAINTAINERS
  +++ b/MAINTAINERS
  @@ -8646,6 +8646,14 @@ W:  http://www.lirc.org/
  S: Odd Fixes
  F: drivers/staging/media/lirc/
  
  +STAGING - LUSTRE PARALLEL FILESYSTEM
  +M:Oleg Drokin oleg.dro...@intel.com
  +M:Andreas Dilger andreas.dil...@intel.com
  +L:hpdd-disc...@lists.01.org (moderated for non-subscribers)
  
  I _really_ hate moderated mailing lists for kernel development stuff.
  Why not just use the driverdev mailing list instead?
 
 I guess this could be done if we really need to, but ...
 
  I note that you didn't even cc: this patch series to that list...
 
 The instructions in the beginning of the file say:
 L: Mailing list that is relevant to this area
 This is the mailing list that is relevant to the area, but we don't really 
 send patches in there,
 and because it's premoderated it's not really convenient anyway as you 
 rightly notice.
 People can ask other questions they might have bout their problems there, 
 though, and there's
 a higher chance that somebody familiar with lustre will read and answer them.
 
 the 'M:' is the send patches to according to the instructions?

Yes, this is correct, but watch out, this isn't going to keep patches
from being sent to the driverdevel mailing list and me applying them
directly.

Personally, I'll never cc: your hpdd mailing list, as I get bounces from
it, and don't feel that kernel mailing lists should ever be closed
(I run an open kernel mailing list, it can be done, and isn't all that
hard...)

So I'll go apply this, but don't really like it...

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: lustre: lustre: ptlrpc: Fix space required

2014-08-30 Thread Greg KH
On Thu, Aug 21, 2014 at 06:59:07PM +0530, Hema Prathaban wrote:
 This patch fixes the checkpatch.pl issue
 Error: Required space after  '+' ',' '=' '(' ' if' 
 
 Signed-off-by: Hema Prathaban hemakl...@gmail.com
 ---
  drivers/staging/lustre/lustre/ptlrpc/client.c   |  2 +-
  drivers/staging/lustre/lustre/ptlrpc/events.c   |  4 ++--
  drivers/staging/lustre/lustre/ptlrpc/import.c   |  8 
  drivers/staging/lustre/lustre/ptlrpc/llog_client.c  | 16 
  drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c |  6 +++---
  drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c |  2 +-
  drivers/staging/lustre/lustre/ptlrpc/sec_config.c   |  6 +++---
  drivers/staging/lustre/lustre/ptlrpc/sec_null.c |  2 +-
  drivers/staging/lustre/lustre/ptlrpc/service.c  |  2 +-
  9 files changed, 24 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c 
 b/drivers/staging/lustre/lustre/ptlrpc/client.c
 index 8fa9b71..a327d19 100644
 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c
 +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
 @@ -289,7 +289,7 @@ static void ptlrpc_at_adj_net_latency(struct 
 ptlrpc_request *req,
   at = req-rq_import-imp_at;
  
   /* Network latency is total time less server processing time */
 - nl = max_t(int, now - req-rq_sent - service_time, 0) +1/*st rounding*/;
 + nl = max_t(int, now - req-rq_sent - service_time, 0) + 1/*st 
 rounding*/;
   if (service_time  now - req-rq_sent + 3 /* bz16408 */)
   CWARN(Reported service time %u  total measured time 
 CFS_DURATION_T\n, service_time,
 diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c 
 b/drivers/staging/lustre/lustre/ptlrpc/events.c
 index c3ec21d..9f5af45 100644
 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c
 +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c
 @@ -186,7 +186,7 @@ void client_bulk_callback(lnet_event_t *ev)
   if (CFS_FAIL_CHECK_ORSET(OBD_FAIL_PTLRPC_CLIENT_BULK_CB, CFS_FAIL_ONCE))
   ev-status = -EIO;
  
 - if (CFS_FAIL_CHECK_ORSET(OBD_FAIL_PTLRPC_CLIENT_BULK_CB2,CFS_FAIL_ONCE))
 + if (CFS_FAIL_CHECK_ORSEuT(OBD_FAIL_PTLRPC_CLIENT_BULK_CB2, 
 CFS_FAIL_ONCE))

You obviously did not compile this code as it breaks the build :(

Please _always_ test build your patches, don't force others to find
errors like this, it's a huge waste of time on my end when it happens...

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] jsm: add support for additional Neo cards

2014-08-30 Thread Greg KH
On Sat, Aug 30, 2014 at 02:54:36PM -0400, wf...@worldbroken.com wrote:
 From: Bill Pemberton wf...@worldbroken.com
 
 Add device ids for additional Neo cards.  The ids come from the dgnc
 driver.
 
 Signed-off-by: Bill Pemberton wf...@worldbroken.com
 ---
  drivers/tty/serial/jsm/jsm_driver.c | 38 
 +
  include/linux/pci_ids.h |  8 
  2 files changed, 42 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/tty/serial/jsm/jsm_driver.c 
 b/drivers/tty/serial/jsm/jsm_driver.c
 index a47d882d6743..d2885a7bb090 100644
 --- a/drivers/tty/serial/jsm/jsm_driver.c
 +++ b/drivers/tty/serial/jsm/jsm_driver.c
 @@ -93,12 +93,34 @@ static int jsm_probe_one(struct pci_dev *pdev, const 
 struct pci_device_id *ent)
   /* store the info for the board we've found */
   brd-boardnum = adapter_count++;
   brd-pci_dev = pdev;
 - if (pdev-device == PCIE_DEVICE_ID_NEO_4_IBM)
 +
 + switch (pdev-device) {
 +
 + case PCI_DEVICE_ID_NEO_2DB9:
 + case PCI_DEVICE_ID_NEO_2DB9PRI:
 + case PCI_DEVICE_ID_NEO_2RJ45:
 + case PCI_DEVICE_ID_NEO_2RJ45PRI:
 + case PCI_DEVICE_ID_NEO_2_422_485:
 + brd-maxports = 2;
 + break;
 +
 + case PCI_DEVICE_ID_NEO_4:
 + case PCIE_DEVICE_ID_NEO_4:
 + case PCIE_DEVICE_ID_NEO_4RJ45:
 + case PCIE_DEVICE_ID_NEO_4_IBM:
   brd-maxports = 4;
 - else if (pdev-device == PCI_DEVICE_ID_DIGI_NEO_8)
 + break;
 +
 + case PCI_DEVICE_ID_DIGI_NEO_8:
 + case PCIE_DEVICE_ID_NEO_8:
 + case PCIE_DEVICE_ID_NEO_8RJ45:
   brd-maxports = 8;
 - else
 - brd-maxports = 2;
 + break;
 +
 + default:
 + brd-maxports = 1;
 + break;
 + }
  
   spin_lock_init(brd-bd_intr_lock);
  
 @@ -209,6 +231,14 @@ static struct pci_device_id jsm_pci_tbl[] = {
   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, 0, 3 },
   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4_IBM), 0, 0, 4 },
   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_NEO_8), 0, 0, 5 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_4), 0, 0, 6 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422), 0, 0, 7 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422_485), 0, 0, 8 
 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2_422_485), 0, 0, 9 
 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8), 0, 0, 10 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4), 0, 0, 11 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4RJ45), 0, 0, 12 },
 + { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8RJ45), 0, 0, 13 },
   { 0, }
  };
  MODULE_DEVICE_TABLE(pci, jsm_pci_tbl);
 diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
 index 6ed0bb73a864..f0f610c94bb2 100644
 --- a/include/linux/pci_ids.h
 +++ b/include/linux/pci_ids.h
 @@ -1516,11 +1516,19 @@
  #define PCI_DEVICE_ID_DIGI_DF_M_E0x0071
  #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A   0x0072
  #define PCI_DEVICE_ID_DIGI_DF_M_A0x0073
 +#define PCI_DEVICE_ID_NEO_4 0x00B0
  #define PCI_DEVICE_ID_DIGI_NEO_8 0x00B1
  #define PCI_DEVICE_ID_NEO_2DB9  0x00C8
  #define PCI_DEVICE_ID_NEO_2DB9PRI   0x00C9
  #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA
  #define PCI_DEVICE_ID_NEO_2RJ45PRI  0x00CB
 +#define PCI_DEVICE_ID_NEO_1_422 0x00CC
 +#define PCI_DEVICE_ID_NEO_1_422_485 0x00CD
 +#define PCI_DEVICE_ID_NEO_2_422_485 0x00CE
 +#define PCIE_DEVICE_ID_NEO_80x00F0
 +#define PCIE_DEVICE_ID_NEO_40x00F1
 +#define PCIE_DEVICE_ID_NEO_4RJ450x00F2
 +#define PCIE_DEVICE_ID_NEO_8RJ450x00F3
  #define PCIE_DEVICE_ID_NEO_4_IBM0x00F4

As per the information in the top of this file, we only add new ids when
they cross multiple files.  Right now these values you are adding are
only for a single driver, so they don't need to be added here.

Can you redo this series without touching the pci_ids.h file?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: fix style in lustre_import.h

2014-08-30 Thread Greg KH
On Fri, Aug 22, 2014 at 07:57:40PM -0400, Spencer Baugh wrote:
 This patch fixes style errors and warnings reported by
 scripts/checkpatch.pl

Which errors and warnings does it fix?

Please always be specific.

And only do one type of fix per patch, you do a few different ones
here, right?

Can you redo it and resend please?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] jsm: add support for additional Neo cards

2014-08-30 Thread wfp5p
From: Bill Pemberton wf...@worldbroken.com

Add device ids for additional Neo cards.  The ids come from the dgnc
driver.

Signed-off-by: Bill Pemberton wf...@worldbroken.com
---
 drivers/tty/serial/jsm/jsm_driver.c | 38 +
 include/linux/pci_ids.h |  8 
 2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_driver.c 
b/drivers/tty/serial/jsm/jsm_driver.c
index a47d882d6743..d2885a7bb090 100644
--- a/drivers/tty/serial/jsm/jsm_driver.c
+++ b/drivers/tty/serial/jsm/jsm_driver.c
@@ -93,12 +93,34 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct 
pci_device_id *ent)
/* store the info for the board we've found */
brd-boardnum = adapter_count++;
brd-pci_dev = pdev;
-   if (pdev-device == PCIE_DEVICE_ID_NEO_4_IBM)
+
+   switch (pdev-device) {
+
+   case PCI_DEVICE_ID_NEO_2DB9:
+   case PCI_DEVICE_ID_NEO_2DB9PRI:
+   case PCI_DEVICE_ID_NEO_2RJ45:
+   case PCI_DEVICE_ID_NEO_2RJ45PRI:
+   case PCI_DEVICE_ID_NEO_2_422_485:
+   brd-maxports = 2;
+   break;
+
+   case PCI_DEVICE_ID_NEO_4:
+   case PCIE_DEVICE_ID_NEO_4:
+   case PCIE_DEVICE_ID_NEO_4RJ45:
+   case PCIE_DEVICE_ID_NEO_4_IBM:
brd-maxports = 4;
-   else if (pdev-device == PCI_DEVICE_ID_DIGI_NEO_8)
+   break;
+
+   case PCI_DEVICE_ID_DIGI_NEO_8:
+   case PCIE_DEVICE_ID_NEO_8:
+   case PCIE_DEVICE_ID_NEO_8RJ45:
brd-maxports = 8;
-   else
-   brd-maxports = 2;
+   break;
+
+   default:
+   brd-maxports = 1;
+   break;
+   }
 
spin_lock_init(brd-bd_intr_lock);
 
@@ -209,6 +231,14 @@ static struct pci_device_id jsm_pci_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, 0, 3 },
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4_IBM), 0, 0, 4 },
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_NEO_8), 0, 0, 5 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_4), 0, 0, 6 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422), 0, 0, 7 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422_485), 0, 0, 8 
},
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2_422_485), 0, 0, 9 
},
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8), 0, 0, 10 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4), 0, 0, 11 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4RJ45), 0, 0, 12 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8RJ45), 0, 0, 13 },
{ 0, }
 };
 MODULE_DEVICE_TABLE(pci, jsm_pci_tbl);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 6ed0bb73a864..f0f610c94bb2 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1516,11 +1516,19 @@
 #define PCI_DEVICE_ID_DIGI_DF_M_E  0x0071
 #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072
 #define PCI_DEVICE_ID_DIGI_DF_M_A  0x0073
+#define PCI_DEVICE_ID_NEO_4 0x00B0
 #define PCI_DEVICE_ID_DIGI_NEO_8   0x00B1
 #define PCI_DEVICE_ID_NEO_2DB9  0x00C8
 #define PCI_DEVICE_ID_NEO_2DB9PRI   0x00C9
 #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA
 #define PCI_DEVICE_ID_NEO_2RJ45PRI  0x00CB
+#define PCI_DEVICE_ID_NEO_1_422 0x00CC
+#define PCI_DEVICE_ID_NEO_1_422_485 0x00CD
+#define PCI_DEVICE_ID_NEO_2_422_485 0x00CE
+#define PCIE_DEVICE_ID_NEO_80x00F0
+#define PCIE_DEVICE_ID_NEO_40x00F1
+#define PCIE_DEVICE_ID_NEO_4RJ450x00F2
+#define PCIE_DEVICE_ID_NEO_8RJ450x00F3
 #define PCIE_DEVICE_ID_NEO_4_IBM0x00F4
 
 #define PCI_VENDOR_ID_XIRCOM   0x115d
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/2] Move Digi Neo card support from dgnc to jsm

2014-08-30 Thread wfp5p
From: Bill Pemberton wf...@worldbroken.com

The jsm driver (drivers/tty/serial/jsm) already supports the Digi Neo
cards that dgnc (staging) supports.  In fact, it appears that jsm was
based on dgnc.  The dgnc driver has PCI ids for more cards than jsm,
this patch moves support for all the Neo cards to jsm.

The result of this will be that dgnc will only support the Classic
cards since the jsm driver doesn't support those cards yet.


Bill Pemberton (2):
  jsm: add support for additional Neo cards
  staging: dgnc: remove Neo card ids from device table

 drivers/staging/dgnc/dgnc_driver.c  | 13 -
 drivers/tty/serial/jsm/jsm_driver.c | 38 +
 include/linux/pci_ids.h |  8 
 3 files changed, 42 insertions(+), 17 deletions(-)

-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv1 2/4] staging:lustre:lnet: lib-md.c delete space before '(' for code style

2014-08-30 Thread Greg KH
On Sat, Aug 30, 2014 at 02:56:09PM +0800, Janet Liu wrote:
 Silences the following checkpatch warning:
   WARNING: space prohibited between function name and open parenthesis '('
 
 Signed-off-by: Janet Liu jianhua@gmail.com
 ---
  drivers/staging/lustre/lnet/lnet/lib-md.c |   18 +-
  1 file changed, 9 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c 
 b/drivers/staging/lustre/lnet/lnet/lib-md.c
 index efd1b82..13f4332 100644
 --- a/drivers/staging/lustre/lnet/lnet/lib-md.c
 +++ b/drivers/staging/lustre/lnet/lnet/lib-md.c
 @@ -110,7 +110,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int 
 unlink)
  
   lmd-md_niov = niov = umd-length;
   memcpy(lmd-md_iov.iov, umd-start,
 -niov * sizeof (lmd-md_iov.iov[0]));
 +niov * sizeof(lmd-md_iov.iov[0]));
  
   for (i = 0; i  (int)niov; i++) {
   /* We take the base address on trust */
 @@ -131,7 +131,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int 
 unlink)
   } else if ((umd-options  LNET_MD_KIOV) != 0) {
   lmd-md_niov = niov = umd-length;
   memcpy(lmd-md_iov.kiov, umd-start,
 -niov * sizeof (lmd-md_iov.kiov[0]));
 +niov * sizeof(lmd-md_iov.kiov[0]));
  
   for (i = 0; i  (int)niov; i++) {
   /* We take the page pointer on trust */
 @@ -266,15 +266,15 @@ int
  LNetMDAttach(lnet_handle_me_t meh, lnet_md_t umd,
lnet_unlink_t unlink, lnet_handle_md_t *handle)
  {
 - LIST_HEAD   (matches);
 - LIST_HEAD   (drops);
 + LIST_HEAD(matches);
 + LIST_HEAD(drops);

This really isn't a function, but I'll take it anyway...

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv1 3/4] staging:lustre:lnet: lib-md.c erase C99 // comments

2014-08-30 Thread Greg KH
On Sat, Aug 30, 2014 at 02:57:33PM +0800, Janet Liu wrote:
 After changing the comments format, the other error disappears.
 So silences two checkpatch errors:
   ERROR: do not use C99 // comments
   ERROR: trailing statements should be on next line
 
 Signed-off-by: Janet Liu jianhua@gmail.com
 ---
  drivers/staging/lustre/lnet/lnet/lib-md.c |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

This doesn't apply properly, maybe due to the first patch not being
applied?

Can you redo patches 1/4 and 3/4 and resend them?  I've taken 2/4 and
4/4 now.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 01/57] Staging: bcm: CmHost.c: Renamed variable: Adapter - ad

2014-08-30 Thread Greg KH
On Wed, Aug 27, 2014 at 01:11:19PM +0200, Matthias Beyer wrote:
  
 -int FreeAdapterDsxBuffer(struct bcm_mini_adapter *Adapter)
 +int FreeadDsxBuffer(struct bcm_mini_adapter *ad)

This change breaks the build:

ERROR: FreeAdapterDsxBuffer [drivers/staging/bcm/bcm_wimax.ko] undefined!

_PLEASE_ always build test your patches, don't make me have to find
these kinds of errors...

Because of this error, I can't take this series.  Please redo, AND TEST
IT, and then resend.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] jsm: add support for additional Neo cards

2014-08-30 Thread Bill Pemberton

On 08/30/2014 02:59 PM, Greg KH wrote:

On Sat, Aug 30, 2014 at 02:54:36PM -0400, wf...@worldbroken.com wrote:

From: Bill Pemberton wf...@worldbroken.com

Add device ids for additional Neo cards.  The ids come from the dgnc
driver.

Signed-off-by: Bill Pemberton wf...@worldbroken.com
---
  drivers/tty/serial/jsm/jsm_driver.c | 38 +
  include/linux/pci_ids.h |  8 
  2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_driver.c 
b/drivers/tty/serial/jsm/jsm_driver.c
index a47d882d6743..d2885a7bb090 100644
--- a/drivers/tty/serial/jsm/jsm_driver.c
+++ b/drivers/tty/serial/jsm/jsm_driver.c
@@ -93,12 +93,34 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct 
pci_device_id *ent)
/* store the info for the board we've found */
brd-boardnum = adapter_count++;
brd-pci_dev = pdev;
-   if (pdev-device == PCIE_DEVICE_ID_NEO_4_IBM)
+
+   switch (pdev-device) {
+
+   case PCI_DEVICE_ID_NEO_2DB9:
+   case PCI_DEVICE_ID_NEO_2DB9PRI:
+   case PCI_DEVICE_ID_NEO_2RJ45:
+   case PCI_DEVICE_ID_NEO_2RJ45PRI:
+   case PCI_DEVICE_ID_NEO_2_422_485:
+   brd-maxports = 2;
+   break;
+
+   case PCI_DEVICE_ID_NEO_4:
+   case PCIE_DEVICE_ID_NEO_4:
+   case PCIE_DEVICE_ID_NEO_4RJ45:
+   case PCIE_DEVICE_ID_NEO_4_IBM:
brd-maxports = 4;
-   else if (pdev-device == PCI_DEVICE_ID_DIGI_NEO_8)
+   break;
+
+   case PCI_DEVICE_ID_DIGI_NEO_8:
+   case PCIE_DEVICE_ID_NEO_8:
+   case PCIE_DEVICE_ID_NEO_8RJ45:
brd-maxports = 8;
-   else
-   brd-maxports = 2;
+   break;
+
+   default:
+   brd-maxports = 1;
+   break;
+   }

spin_lock_init(brd-bd_intr_lock);

@@ -209,6 +231,14 @@ static struct pci_device_id jsm_pci_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, 0, 3 },
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4_IBM), 0, 0, 4 },
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_NEO_8), 0, 0, 5 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_4), 0, 0, 6 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422), 0, 0, 7 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422_485), 0, 0, 8 
},
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2_422_485), 0, 0, 9 
},
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8), 0, 0, 10 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4), 0, 0, 11 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4RJ45), 0, 0, 12 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8RJ45), 0, 0, 13 },
{ 0, }
  };
  MODULE_DEVICE_TABLE(pci, jsm_pci_tbl);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 6ed0bb73a864..f0f610c94bb2 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1516,11 +1516,19 @@
  #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071
  #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A0x0072
  #define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073
+#define PCI_DEVICE_ID_NEO_4 0x00B0
  #define PCI_DEVICE_ID_DIGI_NEO_8  0x00B1
  #define PCI_DEVICE_ID_NEO_2DB9  0x00C8
  #define PCI_DEVICE_ID_NEO_2DB9PRI   0x00C9
  #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA
  #define PCI_DEVICE_ID_NEO_2RJ45PRI  0x00CB
+#define PCI_DEVICE_ID_NEO_1_422 0x00CC
+#define PCI_DEVICE_ID_NEO_1_422_485 0x00CD
+#define PCI_DEVICE_ID_NEO_2_422_485 0x00CE
+#define PCIE_DEVICE_ID_NEO_80x00F0
+#define PCIE_DEVICE_ID_NEO_40x00F1
+#define PCIE_DEVICE_ID_NEO_4RJ450x00F2
+#define PCIE_DEVICE_ID_NEO_8RJ450x00F3
  #define PCIE_DEVICE_ID_NEO_4_IBM0x00F4


As per the information in the top of this file, we only add new ids when
they cross multiple files.  Right now these values you are adding are
only for a single driver, so they don't need to be added here.

Can you redo this series without touching the pci_ids.h file?



Ah, my apologies, obviously I didn't read the top of the pci_ids.h. 
I'll redo these.


--
Bill

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: lustre: adjust spacing within pointer casts

2014-08-30 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
type T;
expression e;
@@
 (
- T *
+ T *
 )
 e
// /smpl

This semantic patch just removes the cast and adds it back, but when it
does so, it follows the spacing conventions of Linux.

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
This should be applied after the first set of GOTO patches.

 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c  |4 ++--
 drivers/staging/lustre/lustre/llite/file.c  |4 ++--
 drivers/staging/lustre/lustre/llite/llite_lib.c |2 +-
 drivers/staging/lustre/lustre/llite/lloop.c |2 +-
 drivers/staging/lustre/lustre/obdclass/class_obd.c  |2 +-
 drivers/staging/lustre/lustre/obdclass/lprocfs_status.c |2 +-
 drivers/staging/lustre/lustre/obdclass/obd_config.c |2 +-
 drivers/staging/lustre/lustre/osc/osc_quota.c   |2 +-
 drivers/staging/lustre/lustre/ptlrpc/connection.c   |2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index 3143222..0cb098e 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -1746,7 +1746,7 @@ ldlm_work_revoke_ast_lock(struct ptlrpc_request_set 
*rqset, void *opaq)
desc.l_req_mode = LCK_EX;
desc.l_granted_mode = 0;
 
-   rc = lock-l_blocking_ast(lock, desc, (void*)arg, LDLM_CB_BLOCKING);
+   rc = lock-l_blocking_ast(lock, desc, (void *)arg, LDLM_CB_BLOCKING);
LDLM_LOCK_RELEASE(lock);
 
return rc;
@@ -1775,7 +1775,7 @@ int ldlm_work_gl_ast_lock(struct ptlrpc_request_set 
*rqset, void *opaq)
arg-gl_desc = gl_work-gl_desc;
 
/* invoke the actual glimpse callback */
-   if (lock-l_glimpse_ast(lock, (void*)arg) == 0)
+   if (lock-l_glimpse_ast(lock, (void *)arg) == 0)
rc = 1;
 
LDLM_LOCK_RELEASE(lock);
diff --git a/drivers/staging/lustre/lustre/llite/file.c 
b/drivers/staging/lustre/lustre/llite/file.c
index 531e062..098deaf 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -1489,7 +1489,7 @@ static int ll_lov_setea(struct inode *inode, struct file 
*file,
if (lump == NULL)
return -ENOMEM;
 
-   if (copy_from_user(lump, (struct lov_user_md  *)arg, lum_size)) {
+   if (copy_from_user(lump, (struct lov_user_md *)arg, lum_size)) {
OBD_FREE_LARGE(lump, lum_size);
return -EFAULT;
}
@@ -2323,7 +2323,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, 
unsigned long arg)
if (mdtidx  0)
return mdtidx;
 
-   if (put_user((int)mdtidx, (int*)arg))
+   if (put_user((int)mdtidx, (int *)arg))
return -EFAULT;
 
return 0;
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c 
b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 5e39e3a..dc87bfe 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -2173,7 +2173,7 @@ int ll_obd_statfs(struct inode *inode, void *arg)
if (rc)
goto out_statfs;
 
-   data = (void*)buf;
+   data = (void *)buf;
if (!data-ioc_inlbuf1 || !data-ioc_inlbuf2 ||
!data-ioc_pbuf1 || !data-ioc_pbuf2) {
rc = -EINVAL;
diff --git a/drivers/staging/lustre/lustre/llite/lloop.c 
b/drivers/staging/lustre/lustre/llite/lloop.c
index 177137a..a5a4115 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -705,7 +705,7 @@ static enum llioc_iter lloop_ioctl(struct inode *unused, 
struct file *file,
dev = MKDEV(lloop_major, lo-lo_number);
 
/* quit if the used pointer is writable */
-   if (put_user((long)old_encode_dev(dev), (long*)arg)) {
+   if (put_user((long)old_encode_dev(dev), (long *)arg)) {
err = -EFAULT;
goto out;
}
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c 
b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 701c6a7..b3c16bc 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -208,7 +208,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
 
/* only for debugging */
if (cmd == LIBCFS_IOC_DEBUG_MASK) {
-   debug_data = (struct libcfs_debug_ioctl_data*)arg;
+   debug_data = (struct libcfs_debug_ioctl_data *)arg;
libcfs_subsystem_debug = debug_data-subs;
libcfs_debug = debug_data-debug;
return 0;
diff --git 

Re: [PATCH 3/8] staging: et131x: Use for loop to initialise contiguous registers to zero

2014-08-30 Thread Greg KH
On Wed, Aug 20, 2014 at 11:17:53PM +0100, Mark Einon wrote:
 Replace a long list of contiguous writel() calls with a for loop iterating
 over the same values.
 
 Signed-off-by: Mark Einon mark.ei...@gmail.com
 ---
  drivers/staging/et131x/et131x.c | 27 +++
  1 file changed, 3 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
 index fffe763..44cc684 100644
 --- a/drivers/staging/et131x/et131x.c
 +++ b/drivers/staging/et131x/et131x.c
 @@ -1138,6 +1138,7 @@ static void et1310_config_rxmac_regs(struct 
 et131x_adapter *adapter)
   u32 sa_lo;
   u32 sa_hi = 0;
   u32 pf_ctrl = 0;
 + u32 *wolw;
  
   /* Disable the MAC while it is being configured (also disable WOL) */
   writel(0x8, rxmac-ctrl);
 @@ -1151,30 +1152,8 @@ static void et1310_config_rxmac_regs(struct 
 et131x_adapter *adapter)
* its default Values of 0x because there are not WOL masks
* as of this time.
*/
 - writel(0, rxmac-mask0_word0);
 - writel(0, rxmac-mask0_word1);
 - writel(0, rxmac-mask0_word2);
 - writel(0, rxmac-mask0_word3);
 -
 - writel(0, rxmac-mask1_word0);
 - writel(0, rxmac-mask1_word1);
 - writel(0, rxmac-mask1_word2);
 - writel(0, rxmac-mask1_word3);
 -
 - writel(0, rxmac-mask2_word0);
 - writel(0, rxmac-mask2_word1);
 - writel(0, rxmac-mask2_word2);
 - writel(0, rxmac-mask2_word3);
 -
 - writel(0, rxmac-mask3_word0);
 - writel(0, rxmac-mask3_word1);
 - writel(0, rxmac-mask3_word2);
 - writel(0, rxmac-mask3_word3);
 -
 - writel(0, rxmac-mask4_word0);
 - writel(0, rxmac-mask4_word1);
 - writel(0, rxmac-mask4_word2);
 - writel(0, rxmac-mask4_word3);
 + for (wolw = rxmac-mask0_word0; wolw = rxmac-mask4_word3; wolw++)
 + writel(0, wolw);

You are now only writing to all locations 1 time, instead of 4 times,
like before, are you sure that is ok?  Hardware is flaky, sometimes it
wants to be written to multiple times...

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[Patch v2 0/2] Move Digi Neo card support from dgnc to jsm

2014-08-30 Thread wfp5p
From: Bill Pemberton wf...@worldbroken.com

The jsm driver (drivers/tty/serial/jsm) already supports the Digi Neo
cards that dgnc (staging) supports.  In fact, it appears that jsm was
based on dgnc.  The dgnc driver has PCI ids for more cards than jsm,
this patch moves support for all the Neo cards to jsm.

The result of this will be that dgnc will only support the Classic
cards since the jsm driver doesn't support those cards yet.


Bill Pemberton (2):
  jsm: add support for additional Neo cards
  staging: dgnc: remove Neo card ids from device table

 drivers/staging/dgnc/dgnc_driver.c  | 13 -
 drivers/tty/serial/jsm/jsm.h| 10 ++
 drivers/tty/serial/jsm/jsm_driver.c | 38 +
 3 files changed, 44 insertions(+), 17 deletions(-)

-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[Patch v2 2/2] staging: dgnc: remove Neo card ids from device table

2014-08-30 Thread wfp5p
From: Bill Pemberton wf...@worldbroken.com

The Digi Neo cards are supported by the jsm driver.  Remove support
for these cards from dgnc.

Signed-off-by: Bill Pemberton wf...@worldbroken.com
---
 drivers/staging/dgnc/dgnc_driver.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.c 
b/drivers/staging/dgnc/dgnc_driver.c
index 764613b2f4b4..ad07cc698147 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -128,19 +128,6 @@ static struct pci_device_id dgnc_pci_tbl[] = {
{   DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0,   1 },
{   DIGI_VID, PCI_DEVICE_CLASSIC_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 
0,   2 },
{   DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0,   3 },
-   {   DIGI_VID, PCI_DEVICE_NEO_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0,   
4 },
-   {   DIGI_VID, PCI_DEVICE_NEO_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0,   
5 },
-   {   DIGI_VID, PCI_DEVICE_NEO_2DB9_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 
0,6 },
-   {   DIGI_VID, PCI_DEVICE_NEO_2DB9PRI_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0, 7 },
-   {   DIGI_VID, PCI_DEVICE_NEO_2RJ45_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 
0,   8 },
-   {   DIGI_VID, PCI_DEVICE_NEO_2RJ45PRI_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0,9 },
-   {   DIGI_VID, PCI_DEVICE_NEO_1_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 
0,   10 },
-   {   DIGI_VID, PCI_DEVICE_NEO_1_422_485_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0,   11 },
-   {   DIGI_VID, PCI_DEVICE_NEO_2_422_485_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0,   12 },
-   {   DIGI_VID, PCI_DEVICE_NEO_EXPRESS_8_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0,13 },
-   {   DIGI_VID, PCI_DEVICE_NEO_EXPRESS_4_DID, PCI_ANY_ID, PCI_ANY_ID, 
0, 0,   14 },
-   {   DIGI_VID, PCI_DEVICE_NEO_EXPRESS_4RJ45_DID, PCI_ANY_ID, 
PCI_ANY_ID, 0, 0,   15 },
-   {   DIGI_VID, PCI_DEVICE_NEO_EXPRESS_8RJ45_DID, PCI_ANY_ID, 
PCI_ANY_ID, 0, 0,   16 },
{0,}/* 0 terminated list. */
 };
 MODULE_DEVICE_TABLE(pci, dgnc_pci_tbl);
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[Patch v2 1/2] jsm: add support for additional Neo cards

2014-08-30 Thread wfp5p
From: Bill Pemberton wf...@worldbroken.com

Add device ids for additional Neo cards.  The ids come from the dgnc
driver.

Signed-off-by: Bill Pemberton wf...@worldbroken.com
---
 drivers/tty/serial/jsm/jsm.h| 10 ++
 drivers/tty/serial/jsm/jsm_driver.c | 38 +
 2 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm.h b/drivers/tty/serial/jsm/jsm.h
index 844d5e4eb1aa..af7013488aeb 100644
--- a/drivers/tty/serial/jsm/jsm.h
+++ b/drivers/tty/serial/jsm/jsm.h
@@ -67,6 +67,16 @@ do { 
\
 #define MAXPORTS   8
 #define MAX_STOPS_SENT 5
 
+/* Board ids */
+#define PCI_DEVICE_ID_NEO_4 0x00B0
+#define PCI_DEVICE_ID_NEO_1_422 0x00CC
+#define PCI_DEVICE_ID_NEO_1_422_485 0x00CD
+#define PCI_DEVICE_ID_NEO_2_422_485 0x00CE
+#define PCIE_DEVICE_ID_NEO_80x00F0
+#define PCIE_DEVICE_ID_NEO_40x00F1
+#define PCIE_DEVICE_ID_NEO_4RJ450x00F2
+#define PCIE_DEVICE_ID_NEO_8RJ450x00F3
+
 /* Board type definitions */
 
 #define T_NEO  
diff --git a/drivers/tty/serial/jsm/jsm_driver.c 
b/drivers/tty/serial/jsm/jsm_driver.c
index a47d882d6743..d2885a7bb090 100644
--- a/drivers/tty/serial/jsm/jsm_driver.c
+++ b/drivers/tty/serial/jsm/jsm_driver.c
@@ -93,12 +93,34 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct 
pci_device_id *ent)
/* store the info for the board we've found */
brd-boardnum = adapter_count++;
brd-pci_dev = pdev;
-   if (pdev-device == PCIE_DEVICE_ID_NEO_4_IBM)
+
+   switch (pdev-device) {
+
+   case PCI_DEVICE_ID_NEO_2DB9:
+   case PCI_DEVICE_ID_NEO_2DB9PRI:
+   case PCI_DEVICE_ID_NEO_2RJ45:
+   case PCI_DEVICE_ID_NEO_2RJ45PRI:
+   case PCI_DEVICE_ID_NEO_2_422_485:
+   brd-maxports = 2;
+   break;
+
+   case PCI_DEVICE_ID_NEO_4:
+   case PCIE_DEVICE_ID_NEO_4:
+   case PCIE_DEVICE_ID_NEO_4RJ45:
+   case PCIE_DEVICE_ID_NEO_4_IBM:
brd-maxports = 4;
-   else if (pdev-device == PCI_DEVICE_ID_DIGI_NEO_8)
+   break;
+
+   case PCI_DEVICE_ID_DIGI_NEO_8:
+   case PCIE_DEVICE_ID_NEO_8:
+   case PCIE_DEVICE_ID_NEO_8RJ45:
brd-maxports = 8;
-   else
-   brd-maxports = 2;
+   break;
+
+   default:
+   brd-maxports = 1;
+   break;
+   }
 
spin_lock_init(brd-bd_intr_lock);
 
@@ -209,6 +231,14 @@ static struct pci_device_id jsm_pci_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, 0, 3 },
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4_IBM), 0, 0, 4 },
{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_NEO_8), 0, 0, 5 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_4), 0, 0, 6 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422), 0, 0, 7 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422_485), 0, 0, 8 
},
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2_422_485), 0, 0, 9 
},
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8), 0, 0, 10 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4), 0, 0, 11 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4RJ45), 0, 0, 12 },
+   { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8RJ45), 0, 0, 13 },
{ 0, }
 };
 MODULE_DEVICE_TABLE(pci, jsm_pci_tbl);
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/4] staging: rtl8188eu: os_intfs.c

2014-08-30 Thread Greg KH
Your subject does not say what is going on in this patch, only the file
being modified :(


On Fri, Aug 22, 2014 at 11:32:38AM +0100, Miguel Oliveira wrote:
 void rtw_proc_remove_one(struct net_device *dev)
 {
 }
 void rtw_proc_init_one(struct net_device *dev)
   /* TODO: Convert these to /sys */
 
 Converting the above from proc into debugfs.
 Convert all rtw_proc_xxx references to rtw_sys_xxx

I don't understand, what exactly are you doing here?

Are you moving stuff to debugfs or to sysfs?  And what exactly are you
moving?  And why?  And if sysfs, you need to document the files.

 
 Signed-off-by: Miguel Oliveira cmro...@gmail.com
 ---
  drivers/staging/rtl8188eu/os_dep/os_intfs.c |  517 
 +--
  1 file changed, 326 insertions(+), 191 deletions(-)
 
 diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
 b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
 index c7a44ab..49b441a 100644
 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
 +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
 @@ -29,6 +29,8 @@
  
  #include usb_hal.h
  
 +#include linux/debugfs.h
 +
  MODULE_LICENSE(GPL);
  MODULE_DESCRIPTION(Realtek Wireless Lan Driver);
  MODULE_AUTHOR(Realtek Semiconductor Corp.);
 @@ -166,50 +168,254 @@ MODULE_PARM_DESC(rtw_notch_filter, 0:Disable, 
 1:Enable, 2:Enable only for P2P)
  module_param_named(debug, rtw_debug, int, 0444);
  MODULE_PARM_DESC(debug, Set debug level (1-9) (default 1));
  
 -/* dummy routines */
 -void rtw_proc_remove_one(struct net_device *dev)
 -{
 -}
 +static const struct file_operations drv_version = {
 + .owner =THIS_MODULE,
 + .read = sys_get_drv_version,
 + .llseek =   default_llseek,
 +};

snip

You do know that debugfs can handle single variables very easily, with
no need for a file_operations structure, right?  Are you sure you need
all of these new structures?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/4] staging: rtl8188eu: osdep_intf.h and usb_intf.c

2014-08-30 Thread Greg KH
On Fri, Aug 22, 2014 at 11:33:37AM +0100, Miguel Oliveira wrote:
 Convert all rtw_proc_xxx references to rtw_sys_xxx in files
 include/osdep_intf.h and os_dep/usb_intf.c

Same comments as the previous ones, please redo all of these patches.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/4] staging: rtl8188eu: rtw_debug.c

2014-08-30 Thread Greg KH
On Fri, Aug 22, 2014 at 11:33:20AM +0100, Miguel Oliveira wrote:
 Convert all rtw_proc_xxx references to rtw_sys_xxx

Again, your subject: is not understandable.

And what are you doing here?

 Code with 62 WARNING: line over 80 characters, I'll write another patch
 to clean the whole file.

What do you mean by this?  Why refer to a future patch in this
changelog, that doesn't help anyone.

confused,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: rtl8188eu: rtw_debug.h

2014-08-30 Thread Greg KH
On Fri, Aug 22, 2014 at 11:33:52AM +0100, Miguel Oliveira wrote:
 Convert all rtw_proc_xxx references to rtw_sys_xxx in file
 include/rtw_debug.h

That's interesting, but:

 
 Signed-off-by: Miguel Oliveira cmro...@gmail.com
 ---
  drivers/staging/rtl8188eu/include/rtw_debug.h |  227 
 +++--
  1 file changed, 98 insertions(+), 129 deletions(-)
 
 diff --git a/drivers/staging/rtl8188eu/include/rtw_debug.h 
 b/drivers/staging/rtl8188eu/include/rtw_debug.h
 index a38616e..aa0f46a 100644
 --- a/drivers/staging/rtl8188eu/include/rtw_debug.h
 +++ b/drivers/staging/rtl8188eu/include/rtw_debug.h
 @@ -87,7 +87,7 @@ extern u32 GlobalDebugLevel;
  #define MSG_88E(...) \
   do {\
   if (_drv_err_ = GlobalDebugLevel)  \
 - pr_info(DRIVER_PREFIX __VA_ARGS__); 
 \
 + pr_info(DRIVER_PREFIX __VA_ARGS__); \

How does this change relate to what you said you were going to do above?

confused,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] rtl8188eu: Replace rcu_dereference() with rcu_access_pointer()

2014-08-30 Thread Greg KH
On Sun, Aug 17, 2014 at 02:43:37PM +0300, Andreea-Cristina Bernat wrote:
 The rcu_dereference() call is used directly in a condition.
 Since its return value is never dereferenced it is recommended to use
 rcu_access_pointer() instead of rcu_dereference().
 Therefore, this patch makes the replacement.
 
 The following Coccinelle semantic patch was used:
 @@
 @@
 
 (
  if(
  (+...
 - rcu_dereference
 + rcu_access_pointer
   (...)
   ...+)) {...}
 |
  while(
  (+...
 - rcu_dereference
 + rcu_access_pointer
   (...)
   ...+)) {...}
 )
 
 Signed-off-by: Andreea-Cristina Bernat bernat@gmail.com
 ---
  drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

This patch fails to apply to my tree, can you refresh it against the
staging-next branch of the staging.git tree on kernel.org and resend?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 03/20] staging: rtl8188eu: Rework function PHY_QueryBBReg()

2014-08-30 Thread Greg KH
On Sat, Aug 23, 2014 at 07:48:24PM +0530, navin patidar wrote:
 Rename CamelCase variables and function name.
 
 Signed-off-by: navin patidar navin.pati...@gmail.com

This patch fails to apply:

checking file drivers/staging/rtl8188eu/hal/HalHWImg8188E_RF.c
checking file drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
checking file drivers/staging/rtl8188eu/hal/odm.c
checking file drivers/staging/rtl8188eu/hal/odm_RTL8188E.c
checking file drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c
checking file drivers/staging/rtl8188eu/hal/usb_halinit.c
checking file drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
checking file drivers/staging/rtl8188eu/include/phy.h
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED

Can you please refresh it against my staging-next branch of the
staging.git tree on git.kernel.org and resend it, and the rest of the
patches in this series so that I can apply them?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8723au: type casting corrections

2014-08-30 Thread Greg KH
On Sun, Aug 17, 2014 at 10:19:28AM -0300, Raphael Silva wrote:
  Type casting corrections in order to solve warnings of the sparce static 
 analyser.
 
 Signed-off-by: Raphael Silva rapp...@gmail.com
 ---
  drivers/staging/rtl8723au/hal/usb_halinit.c   | 4 ++--
  drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c 
 b/drivers/staging/rtl8723au/hal/usb_halinit.c
 index b49bf33..969e4f3 100644
 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c
 +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c
 @@ -1228,9 +1228,9 @@ static void Hal_EfuseParsePIDVID_8723AU(struct 
 rtw_adapter *pAdapter,
   } else {
   /*  VID, PID */
   pHalData-EEPROMVID =
 - le16_to_cpu(*(u16 *)hwinfo[EEPROM_VID_8723AU]);
 + le16_to_cpu(*(__le16 *)hwinfo[EEPROM_VID_8723AU]);

Shouldn't the structure bt of type __le16 so that there is no warning
here?

   pHalData-EEPROMPID =
 - le16_to_cpu(*(u16 *)hwinfo[EEPROM_PID_8723AU]);
 + le16_to_cpu(*(__le16 *)hwinfo[EEPROM_PID_8723AU]);

Same here.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: rtl8821ae: fix sparse warning for static declarations in rtl8821ae/stats.c

2014-08-30 Thread Greg Kroah-Hartman
On Sat, Aug 23, 2014 at 10:55:51AM +0800, Hoang Tran wrote:
 This patch fixes the following sparse warnings in rtl8821ae/stats.c
 
 drivers/staging/rtl8821ae/stats.c:62:6: warning: symbol 'rtl_translate_todbm' 
 was not declared. Should it be static?
 drivers/staging/rtl8821ae/stats.c:101:6: warning: symbol 
 'rtl_process_ui_rssi' was not declared. Should it be static?
 
 Signed-off-by: Hoang Tran hoangtran@gmail.com
 ---
  drivers/staging/rtl8821ae/stats.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

I applied the second patch you sent, why resend it?  What was different
between this one and the previous 2?  Please always be specific about
what you are changing, otherwise I have no idea what to do...

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging:r8190_rtl8256: coding style: Fixed commenting style

2014-08-30 Thread Greg KH
On Mon, Aug 25, 2014 at 12:55:27PM +0530, Sanjeev Sharma wrote:
 This is a patch to the r8190_rtl8256.c file that fixes
 commenting style Error
 
 Signed-off-by: Sanjeev Sharma sanjeev_sha...@mentor.com
 ---
  drivers/staging/rtl8192u/r8190_rtl8256.c | 59 
 +---
  1 file changed, 31 insertions(+), 28 deletions(-)
 
 diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c 
 b/drivers/staging/rtl8192u/r8190_rtl8256.c
 index 43ed768..8fe35ad 100644
 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c
 +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c
 @@ -61,13 +61,15 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev , 
 HT_CHANNEL_WIDTH Bandwidth)
   break;
   case HT_CHANNEL_WIDTH_20_40:
   if (priv-card_8192_version == VERSION_819xU_A 
 || priv-card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: 
 consider it later! */
 - rtl8192_phy_SetRFReg(dev, 
 (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); //phy para:3ba
 + rtl8192_phy_SetRFReg(dev, 
 (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); /* phy para:3ba */
   rtl8192_phy_SetRFReg(dev, 
 (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3df);
   rtl8192_phy_SetRFReg(dev, 
 (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x0a1);
  
 - //cosa add for sd3's request 01/23/2008
 + /* cosa add for sd3's request 01/23/2008
 +  *
 +  */
   if (priv-chan == 3 || priv-chan == 9)
 - //I need to set priv-chan 
 whenever current channel changes
 + /* I need to set priv-chan 
 whenever current channel changes */
   rtl8192_phy_SetRFReg(dev, 
 (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x59b);
   else
   rtl8192_phy_SetRFReg(dev, 
 (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab);
 @@ -91,11 +93,12 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev , 
 HT_CHANNEL_WIDTH Bandwidth)
  void PHY_RF8256_Config(struct net_device *dev)
  {
   struct r8192_priv *priv = ieee80211_priv(dev);
 - // Initialize general global value
 - //
 - // TODO: Extend RF_PATH_C and RF_PATH_D in the future
 + /* Initialize general global value
 +  *
 +  * TODO: Extend RF_PATH_C and RF_PATH_D in the future
 +  */
   priv-NumTotalRFPath = RTL819X_TOTAL_RF_PATH;
 - // Config BB and RF
 + /* Config BB and RF */
   phy_RF8256_Config_ParaFile(dev);
  }
  /*--
 @@ -107,10 +110,11 @@ void PHY_RF8256_Config(struct net_device *dev)
  void phy_RF8256_Config_ParaFile(struct net_device *dev)
  {
   u32 u4RegValue = 0;
 - //static s1Byte szRadioAFile[] = 
 RTL819X_PHY_RADIO_A;
 - //static s1Byte szRadioBFile[] = 
 RTL819X_PHY_RADIO_B;
 - //static s1Byte szRadioCFile[] = 
 RTL819X_PHY_RADIO_C;
 - //static s1Byte szRadioDFile[] = 
 RTL819X_PHY_RADIO_D;
 + /* static s1ByteszRadioAFile[] = 
 RTL819X_PHY_RADIO_A;
 +  * static s1ByteszRadioBFile[] = 
 RTL819X_PHY_RADIO_B;
 +  * static s1ByteszRadioCFile[] = 
 RTL819X_PHY_RADIO_C;
 +  * static s1ByteszRadioDFile[] = 
 RTL819X_PHY_RADIO_D;
 +  */

Why not just remove stuff like this if it's not being used?

Same goes for other commented out code lines.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8821ae: hal_bt_coexist: fix coding style issue

2014-08-30 Thread Greg KH
On Sat, Aug 30, 2014 at 02:10:52PM -0400, An Ha wrote:
 Fix coding style issues, these changes include:
 -Add space between if and brackets
 -Add space after comma in an argument
 -Add space between equal sign to separate the variable and the assignment
 -Remove unnecessary curly braces around one-line if statements
 -Remove unnecessary whitespace between two brackets
 -Remove unnecessary whitespace before newline
 -Join else-if statement onto same line as end curly brace
 -Join open curly brace onto same line as if statement
 -Use foo * instead of foo* for the pointer placement
 -Switch commenting style from C99 comments to C89 comments
 
 Signed-off-by: An Ha zero579...@gmail.com

That's a lot of different things all to be doing in one single patch.
Please break this up into one thing at a time per patch so that it is
reviewable and readable.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] os_dep: Replace rcu_dereference() with rcu_access_pointer()

2014-08-30 Thread Greg KH
On Sun, Aug 17, 2014 at 04:39:16PM +0300, Andreea-Cristina Bernat wrote:
 The rcu_dereference() call is used directly in a condition.
 Since its return value is never dereferenced it is recommended to use
 rcu_access_pointer() instead of rcu_dereference().
 Therefore, this patch makes the replacement.
 
 The following Coccinelle semantic patch was used:
 @@
 @@
 
 (
  if(
  (+...
 - rcu_dereference
 + rcu_access_pointer
   (...)
   ...+)) {...}
 |
  while(
  (+...
 - rcu_dereference
 + rcu_access_pointer
   (...)
   ...+)) {...}
 )
 
 Signed-off-by: Andreea-Cristina Bernat bernat@gmail.com
 ---
  drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

This also doesn't apply :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: android: Add blank line after declaration

2014-08-30 Thread Greg KH
On Wed, Aug 20, 2014 at 04:19:19PM +0100, Purnendu Kapadia wrote:
 Signed-off-by: Purnendu Kapadia pro8li...@gmail.com
 ---
  drivers/staging/android/sync.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
 index e7b2e02..0d37495 100644
 --- a/drivers/staging/android/sync.c
 +++ b/drivers/staging/android/sync.c
 @@ -705,6 +705,7 @@ static long sync_fence_ioctl(struct file *file, unsigned 
 int cmd,
unsigned long arg)
  {
   struct sync_fence *fence = file-private_data;
 +
   switch (cmd) {
   case SYNC_IOC_WAIT:
   return sync_fence_ioctl_wait(fence, arg);

Someone sent this same patch just before you did, sorry.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: android: sw_sync.c: fix new line style issues

2014-08-30 Thread Greg KH
On Mon, Aug 25, 2014 at 08:35:31PM +0100, Koray Gulcu wrote:
 Add two new lines that are missing after declerations as detected by 
 checkpatch.pl
 
 Signed-off-by: Koray Gulcu koray.gu...@ozu.edu.tr
 ---
  drivers/staging/android/sw_sync.c |2 ++
  1 file changed, 2 insertions(+)

2 other people sent this same patch before you did :(

sorry,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/12] staging/lustre/obdclass: remove lu_ucred.c

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

The functions exported by lustre/obdclass/lu_ucred.c are not used so
remove that file.

Signed-off-by: John L. Hammond john.hamm...@intel.com
---
 drivers/staging/lustre/lustre/obdclass/Makefile   |   3 +-
 drivers/staging/lustre/lustre/obdclass/lu_ucred.c | 107 --
 2 files changed, 1 insertion(+), 109 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/lu_ucred.c

diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile 
b/drivers/staging/lustre/lustre/obdclass/Makefile
index 989fb7c..91a5a2b 100644
--- a/drivers/staging/lustre/lustre/obdclass/Makefile
+++ b/drivers/staging/lustre/lustre/obdclass/Makefile
@@ -6,5 +6,4 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o 
linux/linux-sysctl.o \
  lustre_handles.o lustre_peer.o llog_osd.o \
  local_storage.o statfs_pack.o obdo.o obd_config.o obd_mount.o\
  mea.o lu_object.o dt_object.o capa.o cl_object.o   \
- cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o \
- lu_ucred.o
+ cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_ucred.c 
b/drivers/staging/lustre/lustre/obdclass/lu_ucred.c
deleted file mode 100644
index 3676563..000
--- a/drivers/staging/lustre/lustre/obdclass/lu_ucred.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2011, 2012, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * lustre/obdclass/lu_ucred.c
- *
- * Lustre user credentials context infrastructure.
- *
- *   Author: Nikita Danilov nikita.dani...@sun.com
- *   Author: Fan Yong fan.y...@intel.com
- *   Author: Vitaly Fertman vitaly_fert...@xyratex.com
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include ../../include/linux/libcfs/libcfs.h
-#include ../include/obd_support.h
-#include ../include/lu_object.h
-#include ../include/md_object.h
-
-/* context key constructor/destructor: lu_ucred_key_init, lu_ucred_key_fini */
-LU_KEY_INIT_FINI(lu_ucred, struct lu_ucred);
-
-static struct lu_context_key lu_ucred_key = {
-   .lct_tags = LCT_SESSION,
-   .lct_init = lu_ucred_key_init,
-   .lct_fini = lu_ucred_key_fini
-};
-
-/**
- * Get ucred key if session exists and ucred key is allocated on it.
- * Return NULL otherwise.
- */
-struct lu_ucred *lu_ucred(const struct lu_env *env)
-{
-   if (!env-le_ses)
-   return NULL;
-   return lu_context_key_get(env-le_ses, lu_ucred_key);
-}
-EXPORT_SYMBOL(lu_ucred);
-
-/**
- * Get ucred key and check if it is properly initialized.
- * Return NULL otherwise.
- */
-struct lu_ucred *lu_ucred_check(const struct lu_env *env)
-{
-   struct lu_ucred *uc = lu_ucred(env);
-   if (uc  uc-uc_valid != UCRED_OLD  uc-uc_valid != UCRED_NEW)
-   return NULL;
-   return uc;
-}
-EXPORT_SYMBOL(lu_ucred_check);
-
-/**
- * Get ucred key, which must exist and must be properly initialized.
- * Assert otherwise.
- */
-struct lu_ucred *lu_ucred_assert(const struct lu_env *env)
-{
-   struct lu_ucred *uc = lu_ucred_check(env);
-   LASSERT(uc != NULL);
-   return uc;
-}
-EXPORT_SYMBOL(lu_ucred_assert);
-
-int lu_ucred_global_init(void)
-{
-   LU_CONTEXT_KEY_INIT(lu_ucred_key);
-   return lu_context_key_register(lu_ucred_key);
-}
-
-void lu_ucred_global_fini(void)
-{
-   lu_context_key_degister(lu_ucred_key);
-}
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/12] staging/lustre/obdclass: remove idmap.c

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

The functions defined in lustre/include/lustre_idmap.h are not used so
remove them.

Signed-off-by: John L. Hammond john.hamm...@intel.com
Signed-off-by: Oleg Drokin oleg.dro...@intel.com
---
 .../staging/lustre/lustre/include/lustre_idmap.h   | 104 -
 drivers/staging/lustre/lustre/obdclass/Makefile|   2 +-
 drivers/staging/lustre/lustre/obdclass/idmap.c | 477 -
 3 files changed, 1 insertion(+), 582 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/include/lustre_idmap.h
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/idmap.c

diff --git a/drivers/staging/lustre/lustre/include/lustre_idmap.h 
b/drivers/staging/lustre/lustre/include/lustre_idmap.h
deleted file mode 100644
index 5624b8b..000
--- a/drivers/staging/lustre/lustre/include/lustre_idmap.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2012, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * lustre/lustre/include/lustre_idmap.h
- *
- * MDS data structures.
- * See also lustre_idl.h for wire formats of requests.
- */
-
-#ifndef _LUSTRE_IDMAP_H
-#define _LUSTRE_IDMAP_H
-
-/** \defgroup idmap idmap
- *
- * @{
- */
-
-#include ../../include/linux/libcfs/libcfs.h
-
-#define CFS_NGROUPS_PER_BLOCK   ((int)(PAGE_CACHE_SIZE / sizeof(gid_t)))
-
-#define CFS_GROUP_AT(gi, i) \
-   ((gi)-blocks[(i) / CFS_NGROUPS_PER_BLOCK][(i) % CFS_NGROUPS_PER_BLOCK])
-
-enum {
-   CFS_IC_NOTHING = 0,/* convert nothing */
-   CFS_IC_ALL   = 1,/* convert all items */
-   CFS_IC_MAPPED  = 2,/* convert mapped uid/gid */
-   CFS_IC_UNMAPPED= 3 /* convert unmapped uid/gid */
-};
-
-#define  CFS_IDMAP_NOTFOUND (-1)
-
-#define CFS_IDMAP_HASHSIZE  32
-
-enum lustre_idmap_idx {
-   RMT_UIDMAP_IDX,
-   LCL_UIDMAP_IDX,
-   RMT_GIDMAP_IDX,
-   LCL_GIDMAP_IDX,
-   CFS_IDMAP_N_HASHES
-};
-
-struct lustre_idmap_table {
-   spinlock_t  lit_lock;
-   struct list_head
lit_idmaps[CFS_IDMAP_N_HASHES][CFS_IDMAP_HASHSIZE];
-};
-
-struct lu_ucred;
-
-extern void lustre_groups_from_list(struct group_info *ginfo, gid_t *glist);
-extern void lustre_groups_sort(struct group_info *group_info);
-extern int lustre_in_group_p(struct lu_ucred *mu, gid_t grp);
-
-extern int lustre_idmap_add(struct lustre_idmap_table *t,
-   uid_t ruid, uid_t luid,
-   gid_t rgid, gid_t lgid);
-extern int lustre_idmap_del(struct lustre_idmap_table *t,
-   uid_t ruid, uid_t luid,
-   gid_t rgid, gid_t lgid);
-extern int lustre_idmap_lookup_uid(struct lu_ucred *mu,
-  struct lustre_idmap_table *t,
-  int reverse, uid_t uid);
-extern int lustre_idmap_lookup_gid(struct lu_ucred *mu,
-  struct lustre_idmap_table *t,
-  int reverse, gid_t gid);
-extern struct lustre_idmap_table *lustre_idmap_init(void);
-extern void lustre_idmap_fini(struct lustre_idmap_table *t);
-
-/** @} idmap */
-
-#endif
diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile 
b/drivers/staging/lustre/lustre/obdclass/Makefile
index ba10043..989fb7c 100644
--- a/drivers/staging/lustre/lustre/obdclass/Makefile
+++ b/drivers/staging/lustre/lustre/obdclass/Makefile
@@ -6,5 +6,5 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o 
linux/linux-sysctl.o \
  lustre_handles.o lustre_peer.o llog_osd.o \
  local_storage.o statfs_pack.o obdo.o obd_config.o obd_mount.o\
  mea.o lu_object.o dt_object.o capa.o cl_object.o   \
- cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o 

[PATCH 06/12] staging/lustre/obdclass: remove mea.c

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

The functions exported by lustre/obdclass/mea.c are not used so remove
them.

Signed-off-by: John L. Hammond john.hamm...@intel.com
---
 drivers/staging/lustre/lustre/include/obd_class.h |   4 -
 drivers/staging/lustre/lustre/obdclass/Makefile   |   2 +-
 drivers/staging/lustre/lustre/obdclass/mea.c  | 112 --
 3 files changed, 1 insertion(+), 117 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/mea.c

diff --git a/drivers/staging/lustre/lustre/include/obd_class.h 
b/drivers/staging/lustre/lustre/include/obd_class.h
index 4c64471..65143ab 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -2182,10 +2182,6 @@ int class_check_uuid(struct obd_uuid *uuid, __u64 nid);
 void class_init_uuidlist(void);
 void class_exit_uuidlist(void);
 
-/* mea.c */
-int mea_name2idx(struct lmv_stripe_md *mea, const char *name, int namelen);
-int raw_name2idx(int hashtype, int count, const char *name, int namelen);
-
 /* class_obd.c */
 extern char obd_jobid_node[];
 
diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile 
b/drivers/staging/lustre/lustre/obdclass/Makefile
index 91a5a2b..f1dcf8e 100644
--- a/drivers/staging/lustre/lustre/obdclass/Makefile
+++ b/drivers/staging/lustre/lustre/obdclass/Makefile
@@ -5,5 +5,5 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o 
linux/linux-sysctl.o \
  genops.o uuid.o llog_ioctl.o lprocfs_status.o\
  lustre_handles.o lustre_peer.o llog_osd.o \
  local_storage.o statfs_pack.o obdo.o obd_config.o obd_mount.o\
- mea.o lu_object.o dt_object.o capa.o cl_object.o   \
+ lu_object.o dt_object.o capa.o cl_object.o   \
  cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o
diff --git a/drivers/staging/lustre/lustre/obdclass/mea.c 
b/drivers/staging/lustre/lustre/obdclass/mea.c
deleted file mode 100644
index d6ce084..000
--- a/drivers/staging/lustre/lustre/obdclass/mea.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#include ../include/obd_class.h
-#include linux/kmod.h   /* for request_module() */
-#include linux/module.h
-#include linux/slab.h
-#include linux/pagemap.h
-#include ../include/lprocfs_status.h
-#include ../include/lustre/lustre_idl.h
-
-static int mea_last_char_hash(int count, char *name, int namelen)
-{
-   unsigned int c;
-
-   c = name[namelen - 1];
-   if (c == 0)
-   CWARN(looks like wrong len is passed\n);
-   c = c % count;
-   return c;
-}
-
-static int mea_all_chars_hash(int count, char *name, int namelen)
-{
-   unsigned int c = 0;
-
-   while (--namelen = 0)
-   c += name[namelen];
-   c = c % count;
-   return c;
-}
-
-int raw_name2idx(int hashtype, int count, const char *name, int namelen)
-{
-   unsigned intc = 0;
-   int idx;
-
-   LASSERT(namelen  0);
-
-   if (filename_is_volatile(name, namelen, idx)) {
-   if ((idx = 0)  (idx  count))
-   return idx;
-   goto hashchoice;
-   }
-
-   if (count = 1)
-   return 0;
-
-hashchoice:
-   switch (hashtype) {
-   case MEA_MAGIC_LAST_CHAR:
-   c = mea_last_char_hash(count, (char *)name, namelen);
-   break;
-   case MEA_MAGIC_ALL_CHARS:
-   c = mea_all_chars_hash(count, (char *)name, namelen);
-   break;
-   case MEA_MAGIC_HASH_SEGMENT:
-   CERROR(Unsupported hash type MEA_MAGIC_HASH_SEGMENT\n);
-   break;
-   default:
-   CERROR(Unknown hash type 

[PATCH 01/12] staging/lustre: Remove unused header libcfs_heap.h

2014-08-30 Thread Oleg Drokin
With removal of libcfs/heap.c, it's header can also go away now.

Signed-off-by: Oleg Drokin gr...@linuxhacker.ru
---
 .../staging/lustre/include/linux/libcfs/libcfs.h   |   1 -
 .../lustre/include/linux/libcfs/libcfs_heap.h  | 200 -
 drivers/staging/lustre/lustre/include/lustre_net.h |   1 -
 3 files changed, 202 deletions(-)
 delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 7d37bec..1122ae9 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -165,7 +165,6 @@ void cfs_get_random_bytes(void *buf, int size);
 #include libcfs_kernelcomm.h
 #include libcfs_workitem.h
 #include libcfs_hash.h
-#include libcfs_heap.h
 #include libcfs_fail.h
 #include libcfs_crypto.h
 
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h
deleted file mode 100644
index bfa6d7b..000
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License version 2 for more details.  A copy is
- * included in the COPYING file that accompanied this code.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2011 Intel Corporation
- */
-/*
- * libcfs/include/libcfs/heap.h
- *
- * Author: Eric Barton e...@whamcloud.com
- *Liang Zhen   li...@whamcloud.com
- */
-
-#ifndef __LIBCFS_HEAP_H__
-#define __LIBCFS_HEAP_H__
-
-/** \defgroup heap Binary heap
- *
- * The binary heap is a scalable data structure created using a binary tree. It
- * is capable of maintaining large sets of elements sorted usually by one or
- * more element properties, but really based on anything that can be used as a
- * binary predicate in order to determine the relevant ordering of any two 
nodes
- * that belong to the set. There is no search operation, rather the intention 
is
- * for the element of the lowest priority which will always be at the root of
- * the tree (as this is an implementation of a min-heap) to be removed by users
- * for consumption.
- *
- * Users of the heap should embed a \e cfs_binheap_node_t object instance on
- * every object of the set that they wish the binary heap instance to handle,
- * and (at a minimum) provide a cfs_binheap_ops_t::hop_compare() implementation
- * which is used by the heap as the binary predicate during its internal 
sorting
- * operations.
- *
- * The current implementation enforces no locking scheme, and so assumes the
- * user caters for locking between calls to insert, delete and lookup
- * operations. Since the only consumer for the data structure at this point
- * are NRS policies, and these operate on a per-CPT basis, binary heap 
instances
- * are tied to a specific CPT.
- * @{
- */
-
-/**
- * Binary heap node.
- *
- * Objects of this type are embedded into objects of the ordered set that is to
- * be maintained by a \e cfs_binheap_t instance.
- */
-typedef struct {
-   /** Index into the binary tree */
-   unsigned intchn_index;
-} cfs_binheap_node_t;
-
-#define CBH_SHIFT  9
-#define CBH_SIZE   (1  CBH_SHIFT)/* # ptrs per level 
*/
-#define CBH_MASK   (CBH_SIZE - 1)
-#define CBH_NOB(CBH_SIZE * sizeof(cfs_binheap_node_t *))
-
-#define CBH_POISON 0xdeadbeef
-
-/**
- * Binary heap flags.
- */
-enum {
-   CBH_FLAG_ATOMIC_GROW= 1,
-};
-
-struct cfs_binheap;
-
-/**
- * Binary heap operations.
- */
-typedef struct {
-   /**
-* Called right before inserting a node into the binary heap.
-*
-* Implementing this operation is optional.
-*
-* \param[in] h The heap
-* \param[in] e The node
-*
-* \retval 0 success
-* \retval != 0 error
-*/
-   int (*hop_enter)(struct cfs_binheap *h,
-cfs_binheap_node_t *e);
-   /**
-* Called right after removing a node from the binary heap.
-*
-* Implementing this operation is optional.
-*
-* \param[in] h The heap
-* \param[in] e The node
-*/
-   

[PATCH 03/12] staging/lustre/obdecho: remove #if 0-ed out regions

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

The landing of clio #if 0-ed out some regions of echo_client.c. Just
remove these regions entirely.

Signed-off-by: John L. Hammond john.hamm...@intel.com
Reviewed-on: http://review.whamcloud.com/5580
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-by: James Simmons uja.o...@gmail.com
Reviewed-by: Andreas Dilger andreas.dil...@intel.com
Reviewed-by: Oleg Drokin oleg.dro...@intel.com
---
 .../staging/lustre/lustre/obdecho/echo_client.c| 50 --
 1 file changed, 50 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c 
b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index 68a5ed1..98e4290 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -93,16 +93,6 @@ struct echo_lock {
atomic_t   el_refcount;
 };
 
-struct echo_io {
-   struct cl_io_slice ei_cl;
-};
-
-#if 0
-struct echo_req {
-   struct cl_req_slice er_cl;
-};
-#endif
-
 static int echo_client_setup(const struct lu_env *env,
 struct obd_device *obddev,
 struct lustre_cfg *lcfg);
@@ -200,7 +190,6 @@ static struct kmem_cache *echo_lock_kmem;
 static struct kmem_cache *echo_object_kmem;
 static struct kmem_cache *echo_thread_kmem;
 static struct kmem_cache *echo_session_kmem;
-//static struct kmem_cache *echo_req_kmem;
 
 static struct lu_kmem_descr echo_caches[] = {
{
@@ -223,13 +212,6 @@ static struct lu_kmem_descr echo_caches[] = {
.ckd_name  = echo_session_kmem,
.ckd_size  = sizeof (struct echo_session_info)
},
-#if 0
-   {
-   .ckd_cache = echo_req_kmem,
-   .ckd_name  = echo_req_kmem,
-   .ckd_size  = sizeof (struct echo_req)
-   },
-#endif
{
.ckd_cache = NULL
}
@@ -2100,37 +2082,11 @@ static int echo_client_connect(const struct lu_env *env,
 
 static int echo_client_disconnect(struct obd_export *exp)
 {
-#if 0
-   struct obd_device  *obd;
-   struct echo_client_obd *ec;
-   struct ec_lock   *ecl;
-#endif
int  rc;
 
if (exp == NULL)
GOTO(out, rc = -EINVAL);
 
-#if 0
-   obd = exp-exp_obd;
-   ec = obd-u.echo_client;
-
-   /* no more contention on export's lock list */
-   while (!list_empty (exp-exp_ec_data.eced_locks)) {
-   ecl = list_entry (exp-exp_ec_data.eced_locks.next,
- struct ec_lock, ecl_exp_chain);
-   list_del (ecl-ecl_exp_chain);
-
-   rc = obd_cancel(ec-ec_exp, ecl-ecl_object-eco_lsm,
-ecl-ecl_mode, ecl-ecl_lock_handle);
-
-   CDEBUG (D_INFO, Cancel lock on object %#llx on disconnect 
-   (%d)\n, ecl-ecl_object-eco_id, rc);
-
-   echo_put_object (ecl-ecl_object);
-   OBD_FREE (ecl, sizeof (*ecl));
-   }
-#endif
-
rc = class_disconnect(exp);
GOTO(out, rc);
  out:
@@ -2139,12 +2095,6 @@ static int echo_client_disconnect(struct obd_export *exp)
 
 static struct obd_ops echo_client_obd_ops = {
.o_owner   = THIS_MODULE,
-
-#if 0
-   .o_setup   = echo_client_setup,
-   .o_cleanup = echo_client_cleanup,
-#endif
-
.o_iocontrol   = echo_client_iocontrol,
.o_connect = echo_client_connect,
.o_disconnect  = echo_client_disconnect
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/12] lustre: continues dead code removal

2014-08-30 Thread Oleg Drokin
This series of patches continues removal of unused code in
lustre client tree.

John L. Hammond (9):
  staging/lustre/obdecho: remove #if 0-ed out regions
  staging/lustre/obdclass: remove idmap.c
  staging/lustre/obdclass: remove lu_ucred.c
  staging/lustre/obdclass: remove mea.c
  staging/lustre: remove md_object.h
  staging/lustre/mgc: remove server specific handlers
  staging/lustre/obdclass: remove llog_test.ko
  staging/lustre/obdclass: remove llog_osd.c
  staging/lustre/mdc: remove obsolete llog ioctl handlers

Oleg Drokin (2):
  staging/lustre: Remove unused header libcfs_heap.h
  staging/lustre: remove unused som_attrs and hsm_attrs structures

Peng Tao (1):
  staging/lustre/obdecho: remove metadata echo client

 .../staging/lustre/include/linux/libcfs/libcfs.h   |1 -
 .../lustre/include/linux/libcfs/libcfs_heap.h  |  200 ---
 drivers/staging/lustre/lustre/fid/lproc_fid.c  |1 -
 drivers/staging/lustre/lustre/fld/fld_cache.c  |1 -
 drivers/staging/lustre/lustre/fld/fld_request.c|1 -
 drivers/staging/lustre/lustre/fld/lproc_fld.c  |1 -
 .../lustre/lustre/include/lustre/lustre_idl.h  |   37 -
 .../staging/lustre/lustre/include/lustre_idmap.h   |  104 --
 drivers/staging/lustre/lustre/include/lustre_log.h |9 -
 drivers/staging/lustre/lustre/include/lustre_net.h |1 -
 drivers/staging/lustre/lustre/include/md_object.h  |  899 --
 drivers/staging/lustre/lustre/include/obd_class.h  |4 -
 drivers/staging/lustre/lustre/mdc/mdc_request.c|   15 -
 drivers/staging/lustre/lustre/mgc/mgc_request.c|  177 ---
 drivers/staging/lustre/lustre/obdclass/Makefile|9 +-
 drivers/staging/lustre/lustre/obdclass/idmap.c |  477 
 drivers/staging/lustre/lustre/obdclass/llog_osd.c  | 1290 
 drivers/staging/lustre/lustre/obdclass/llog_test.c | 1072 
 drivers/staging/lustre/lustre/obdclass/lu_ucred.c  |  107 --
 drivers/staging/lustre/lustre/obdclass/mea.c   |  112 --
 .../staging/lustre/lustre/obdecho/echo_client.c| 1103 +
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c|   48 -
 22 files changed, 50 insertions(+), 5619 deletions(-)
 delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h
 delete mode 100644 drivers/staging/lustre/lustre/include/lustre_idmap.h
 delete mode 100644 drivers/staging/lustre/lustre/include/md_object.h
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/idmap.c
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_osd.c
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_test.c
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/lu_ucred.c
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/mea.c

-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/12] staging/lustre/mgc: remove server specific handlers

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

Remove the server specific set_info handlers (KEY_REGISTER_TARGET,
KEY_SET_FS, KEY_CLEAR_FS) and supporting functions.

Signed-off-by: John L. Hammond john.hamm...@intel.com
Signed-off-by: Oleg Drokin gr...@linuxhacker.ru
---
 drivers/staging/lustre/lustre/mgc/mgc_request.c | 177 
 1 file changed, 177 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c 
b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index b21a135..970e91c 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -47,7 +47,6 @@
 #include ../include/lprocfs_status.h
 #include ../include/lustre_log.h
 #include ../include/lustre_disk.h
-#include ../include/dt_object.h
 
 #include mgc_internal.h
 
@@ -628,150 +627,6 @@ static void mgc_requeue_add(struct config_llog_data *cld)
}
 }
 
-/** class fns **/
-static int mgc_local_llog_init(const struct lu_env *env,
-  struct obd_device *obd,
-  struct obd_device *disk)
-{
-   struct llog_ctxt*ctxt;
-   int  rc;
-
-   rc = llog_setup(env, obd, obd-obd_olg, LLOG_CONFIG_ORIG_CTXT, disk,
-   llog_osd_ops);
-   if (rc)
-   return rc;
-
-   ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-   LASSERT(ctxt);
-   ctxt-loc_dir = obd-u.cli.cl_mgc_configs_dir;
-   llog_ctxt_put(ctxt);
-
-   return 0;
-}
-
-static int mgc_local_llog_fini(const struct lu_env *env,
-  struct obd_device *obd)
-{
-   struct llog_ctxt *ctxt;
-
-   ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-   llog_cleanup(env, ctxt);
-
-   return 0;
-}
-
-static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb)
-{
-   struct lustre_sb_info   *lsi = s2lsi(sb);
-   struct client_obd   *cli = obd-u.cli;
-   struct lu_fidrfid, fid;
-   struct dt_object*root, *dto;
-   struct lu_env   *env;
-   int  rc = 0;
-
-   LASSERT(lsi);
-   LASSERT(lsi-lsi_dt_dev);
-
-   OBD_ALLOC_PTR(env);
-   if (env == NULL)
-   return -ENOMEM;
-
-   /* The mgc fs exclusion mutex. Only one fs can be setup at a time. */
-   mutex_lock(cli-cl_mgc_mutex);
-
-   cfs_cleanup_group_info();
-
-   /* Setup the configs dir */
-   rc = lu_env_init(env, LCT_MG_THREAD);
-   if (rc)
-   goto out_err;
-
-   fid.f_seq = FID_SEQ_LOCAL_NAME;
-   fid.f_oid = 1;
-   fid.f_ver = 0;
-   rc = local_oid_storage_init(env, lsi-lsi_dt_dev, fid,
-   cli-cl_mgc_los);
-   if (rc)
-   goto out_env;
-
-   rc = dt_root_get(env, lsi-lsi_dt_dev, rfid);
-   if (rc)
-   goto out_env;
-
-   root = dt_locate_at(env, lsi-lsi_dt_dev, rfid,
-   cli-cl_mgc_los-los_dev-dd_lu_dev);
-   if (unlikely(IS_ERR(root))) {
-   rc = PTR_ERR(root);
-   goto out_los;
-   }
-
-   dto = local_file_find_or_create(env, cli-cl_mgc_los, root,
-   MOUNT_CONFIGS_DIR,
-   S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO);
-   lu_object_put_nocache(env, root-do_lu);
-   if (IS_ERR(dto)) {
-   rc = PTR_ERR(dto);
-   goto out_los;
-   }
-
-   cli-cl_mgc_configs_dir = dto;
-
-   LASSERT(lsi-lsi_osd_exp-exp_obd-obd_lvfs_ctxt.dt);
-   rc = mgc_local_llog_init(env, obd, lsi-lsi_osd_exp-exp_obd);
-   if (rc)
-   goto out_llog;
-
-   /* We take an obd ref to insure that we can't get to mgc_cleanup
-* without calling mgc_fs_cleanup first. */
-   class_incref(obd, mgc_fs, obd);
-
-   /* We keep the cl_mgc_sem until mgc_fs_cleanup */
-out_llog:
-   if (rc) {
-   lu_object_put(env, cli-cl_mgc_configs_dir-do_lu);
-   cli-cl_mgc_configs_dir = NULL;
-   }
-out_los:
-   if (rc  0) {
-   local_oid_storage_fini(env, cli-cl_mgc_los);
-   cli-cl_mgc_los = NULL;
-   mutex_unlock(cli-cl_mgc_mutex);
-   }
-out_env:
-   lu_env_fini(env);
-out_err:
-   OBD_FREE_PTR(env);
-   return rc;
-}
-
-static int mgc_fs_cleanup(struct obd_device *obd)
-{
-   struct lu_envenv;
-   struct client_obd   *cli = obd-u.cli;
-   int  rc;
-
-   LASSERT(cli-cl_mgc_los != NULL);
-
-   rc = lu_env_init(env, LCT_MG_THREAD);
-   if (rc)
-   goto unlock;
-
-   mgc_local_llog_fini(env, obd);
-
-   lu_object_put_nocache(env, cli-cl_mgc_configs_dir-do_lu);
-   cli-cl_mgc_configs_dir = NULL;
-
-   local_oid_storage_fini(env, cli-cl_mgc_los);
-   cli-cl_mgc_los = NULL;
- 

[PATCH 02/12] staging/lustre/obdecho: remove metadata echo client

2014-08-30 Thread Oleg Drokin
From: Peng Tao tao.p...@emc.com

The metadata echo client requires server support and should not have
been included.

Signed-off-by: Liu Xuezhao xuezhao@emc.com
Signed-off-by: Peng Tao tao.p...@emc.com
Signed-off-by: John L. Hammond john.hamm...@intel.com
Reviewed-on: http://review.whamcloud.com/2674
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1330
Reviewed-by: Nathaniel Clark nathaniel.l.cl...@intel.com
Signed-off-by: Oleg Drokin oleg.dro...@intel.com
---
 .../staging/lustre/lustre/obdecho/echo_client.c| 1053 +---
 1 file changed, 46 insertions(+), 1007 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c 
b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index ad5acf6..68a5ed1 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -43,7 +43,6 @@
 #include ../include/lustre_debug.h
 #include ../include/lprocfs_status.h
 #include ../include/cl_object.h
-#include ../include/md_object.h
 #include ../include/lustre_fid.h
 #include ../include/lustre_acl.h
 #include ../include/lustre_net.h
@@ -62,8 +61,6 @@ struct echo_device {
struct cl_site   *ed_site;
struct lu_device   *ed_next;
int  ed_next_islov;
-   int  ed_next_ismd;
-   struct lu_client_seq   *ed_cl_seq;
 };
 
 struct echo_object {
@@ -192,17 +189,6 @@ struct echo_thread_info {
struct cl_lock_descreti_descr;
struct lu_fid  eti_fid;
struct lu_fid   eti_fid2;
-   struct md_op_spec   eti_spec;
-   struct lov_mds_md_v3eti_lmm;
-   struct lov_user_md_v3   eti_lum;
-   struct md_attreti_ma;
-   struct lu_nameeti_lname;
-   /* per-thread values, can be re-used */
-   void*eti_big_lmm;
-   int eti_big_lmmsize;
-   chareti_name[20];
-   struct lu_buf  eti_buf;
-   chareti_xattr_buf[LUSTRE_POSIX_ACL_MAX_SIZE];
 };
 
 /* No session used right now */
@@ -463,6 +449,8 @@ static int echo_object_init(const struct lu_env *env, 
struct lu_object *obj,
struct echo_device *ed   = cl2echo_dev(lu2cl_dev(obj-lo_dev));
struct echo_client_obd *ec = ed-ed_ec;
struct echo_object *eco = cl2echo_obj(lu2cl(obj));
+   const struct cl_object_conf *cconf;
+   struct echo_object_conf *econf;
 
if (ed-ed_next) {
struct lu_object  *below;
@@ -476,17 +464,13 @@ static int echo_object_init(const struct lu_env *env, 
struct lu_object *obj,
lu_object_add(obj, below);
}
 
-   if (!ed-ed_next_ismd) {
-   const struct cl_object_conf *cconf = lu2cl_conf(conf);
-   struct echo_object_conf *econf = cl2echo_conf(cconf);
+   cconf = lu2cl_conf(conf);
+   econf = cl2echo_conf(cconf);
 
-   LASSERT(econf-eoc_md);
-   eco-eo_lsm = *econf-eoc_md;
-   /* clear the lsm pointer so that it won't get freed. */
-   *econf-eoc_md = NULL;
-   } else {
-   eco-eo_lsm = NULL;
-   }
+   LASSERT(econf-eoc_md);
+   eco-eo_lsm = *econf-eoc_md;
+   /* clear the lsm pointer so that it won't get freed. */
+   *econf-eoc_md = NULL;
 
eco-eo_dev = ed;
atomic_set(eco-eo_npages, 0);
@@ -651,8 +635,7 @@ static int echo_site_init(const struct lu_env *env, struct 
echo_device *ed)
 static void echo_site_fini(const struct lu_env *env, struct echo_device *ed)
 {
if (ed-ed_site) {
-   if (!ed-ed_next_ismd)
-   cl_site_fini(ed-ed_site);
+   cl_site_fini(ed-ed_site);
ed-ed_site = NULL;
}
 }
@@ -719,53 +702,6 @@ static struct lu_context_key echo_session_key = {
 
 LU_TYPE_INIT_FINI(echo, echo_thread_key, echo_session_key);
 
-#define ECHO_SEQ_WIDTH 0x
-static int echo_fid_init(struct echo_device *ed, char *obd_name,
-struct seq_server_site *ss)
-{
-   char *prefix;
-   int rc;
-
-   OBD_ALLOC_PTR(ed-ed_cl_seq);
-   if (ed-ed_cl_seq == NULL)
-   return -ENOMEM;
-
-   OBD_ALLOC(prefix, MAX_OBD_NAME + 5);
-   if (prefix == NULL)
-   GOTO(out_free_seq, rc = -ENOMEM);
-
-   snprintf(prefix, MAX_OBD_NAME + 5, srv-%s, obd_name);
-
-   /* Init client side sequence-manager */
-   rc = seq_client_init(ed-ed_cl_seq, NULL,
-LUSTRE_SEQ_METADATA,
-prefix, ss-ss_server_seq);
-   ed-ed_cl_seq-lcs_width = ECHO_SEQ_WIDTH;
-   OBD_FREE(prefix, MAX_OBD_NAME + 5);
-   if (rc)
-   GOTO(out_free_seq, rc);
-
-   return 0;
-
-out_free_seq:
-   OBD_FREE_PTR(ed-ed_cl_seq);
-   ed-ed_cl_seq = NULL;
-   return rc;
-}
-
-static int echo_fid_fini(struct obd_device *obddev)
-{
-   struct echo_device *ed = 

[PATCH 07/12] staging/lustre: remove md_object.h

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

The declarations from lustre/include/md_object.h are not used so
remove them.

Signed-off-by: John L. Hammond john.hamm...@intel.com
Signed-off-by: Oleg Drokin oleg.dro...@intel.com
---
 drivers/staging/lustre/lustre/fid/lproc_fid.c |   1 -
 drivers/staging/lustre/lustre/fld/fld_cache.c |   1 -
 drivers/staging/lustre/lustre/fld/fld_request.c   |   1 -
 drivers/staging/lustre/lustre/fld/lproc_fld.c |   1 -
 drivers/staging/lustre/lustre/include/md_object.h | 899 --
 5 files changed, 903 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/include/md_object.h

diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c 
b/drivers/staging/lustre/lustre/fid/lproc_fid.c
index 92a27fa..c9fa676 100644
--- a/drivers/staging/lustre/lustre/fid/lproc_fid.c
+++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c
@@ -48,7 +48,6 @@
 #include ../include/obd.h
 #include ../include/obd_class.h
 #include ../include/dt_object.h
-#include ../include/md_object.h
 #include ../include/obd_support.h
 #include ../include/lustre_req_layout.h
 #include ../include/lustre_fid.h
diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c 
b/drivers/staging/lustre/lustre/fld/fld_cache.c
index f5a340a..5d95d0b 100644
--- a/drivers/staging/lustre/lustre/fld/fld_cache.c
+++ b/drivers/staging/lustre/lustre/fld/fld_cache.c
@@ -54,7 +54,6 @@
 #include ../include/lprocfs_status.h
 
 #include ../include/dt_object.h
-#include ../include/md_object.h
 #include ../include/lustre_req_layout.h
 #include ../include/lustre_fld.h
 #include fld_internal.h
diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index f63c669..02454db 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -53,7 +53,6 @@
 #include ../include/lprocfs_status.h
 
 #include ../include/dt_object.h
-#include ../include/md_object.h
 #include ../include/lustre_req_layout.h
 #include ../include/lustre_fld.h
 #include ../include/lustre_mdc.h
diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c 
b/drivers/staging/lustre/lustre/fld/lproc_fld.c
index 7f6bcc6..95e7de1 100644
--- a/drivers/staging/lustre/lustre/fld/lproc_fld.c
+++ b/drivers/staging/lustre/lustre/fld/lproc_fld.c
@@ -49,7 +49,6 @@
 #include ../include/obd.h
 #include ../include/obd_class.h
 #include ../include/dt_object.h
-#include ../include/md_object.h
 #include ../include/obd_support.h
 #include ../include/lustre_req_layout.h
 #include ../include/lustre_fld.h
diff --git a/drivers/staging/lustre/lustre/include/md_object.h 
b/drivers/staging/lustre/lustre/include/md_object.h
deleted file mode 100644
index 454a230..000
--- a/drivers/staging/lustre/lustre/include/md_object.h
+++ /dev/null
@@ -1,899 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2011, 2012, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * lustre/include/md_object.h
- *
- * Extension of lu_object.h for metadata objects
- */
-
-#ifndef _LUSTRE_MD_OBJECT_H
-#define _LUSTRE_MD_OBJECT_H
-
-/** \defgroup md md
- * Sub-class of lu_object with methods common for meta-data objects in MDT
- * stack.
- *
- * Meta-data objects implement namespace operations: you can link, unlink
- * them, and treat them as directories.
- *
- * Examples: mdt, cmm, and mdt are implementations of md interface.
- * @{
- */
-
-
-/*
- * super-class definitions.
- */
-#include dt_object.h
-
-struct md_device;
-struct md_device_operations;
-struct md_object;
-struct obd_export;
-
-enum {
-   UCRED_INVALID   = -1,
-   UCRED_INIT  = 0,
-   UCRED_OLD   = 1,
-   UCRED_NEW   = 2
-};
-
-enum {
-   MD_CAPAINFO_MAX = 5
-};
-
-/** there are at most 5 fids in 

[PATCH 12/12] staging/lustre: remove unused som_attrs and hsm_attrs structures

2014-08-30 Thread Oleg Drokin
These structures are only used server-side to parse relevant
attributes.

Signed-off-by: Oleg Drokin gr...@linuxhacker.ru
---
 .../lustre/lustre/include/lustre/lustre_idl.h  | 37 -
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c| 48 --
 2 files changed, 85 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 88c3990..e529ad4 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -322,43 +322,6 @@ enum lma_incompat {
 #define LMA_INCOMPAT_SUPP  (LMAI_AGENT | LMAI_REMOTE_PARENT)
 
 /**
- * SOM on-disk attributes stored in a separate xattr.
- */
-struct som_attrs {
-   /** Bitfield for supported data in this structure. For future use. */
-   __u32   som_compat;
-
-   /** Incompat feature list. The supported feature mask is available in
-* SOM_INCOMPAT_SUPP */
-   __u32   som_incompat;
-
-   /** IO Epoch SOM attributes belongs to */
-   __u64   som_ioepoch;
-   /** total file size in objects */
-   __u64   som_size;
-   /** total fs blocks in objects */
-   __u64   som_blocks;
-   /** mds mount id the size is valid for */
-   __u64   som_mountid;
-};
-#define SOM_INCOMPAT_SUPP 0x0
-
-/**
- * HSM on-disk attributes stored in a separate xattr.
- */
-struct hsm_attrs {
-   /** Bitfield for supported data in this structure. For future use. */
-   __u32   hsm_compat;
-
-   /** HSM flags, see hsm_flags enum below */
-   __u32   hsm_flags;
-   /** backend archive id associated with the file */
-   __u64   hsm_arch_id;
-   /** version associated with the last archiving, if any */
-   __u64   hsm_arch_ver;
-};
-
-/**
  * fid constants
  */
 enum {
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c 
b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 0624420..d6d9204 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -460,54 +460,6 @@ void lustre_assert_wire_constants(void)
LASSERTF(OBJ_INDEX_DELETE == 11, found %lld\n,
 (long long)OBJ_INDEX_DELETE);
 
-   /* Checks for struct som_attrs */
-   LASSERTF((int)sizeof(struct som_attrs) == 40, found %lld\n,
-(long long)(int)sizeof(struct som_attrs));
-   LASSERTF((int)offsetof(struct som_attrs, som_compat) == 0, found 
%lld\n,
-(long long)(int)offsetof(struct som_attrs, som_compat));
-   LASSERTF((int)sizeof(((struct som_attrs *)0)-som_compat) == 4, found 
%lld\n,
-(long long)(int)sizeof(((struct som_attrs *)0)-som_compat));
-   LASSERTF((int)offsetof(struct som_attrs, som_incompat) == 4, found 
%lld\n,
-(long long)(int)offsetof(struct som_attrs, som_incompat));
-   LASSERTF((int)sizeof(((struct som_attrs *)0)-som_incompat) == 4, 
found %lld\n,
-(long long)(int)sizeof(((struct som_attrs *)0)-som_incompat));
-   LASSERTF((int)offsetof(struct som_attrs, som_ioepoch) == 8, found 
%lld\n,
-(long long)(int)offsetof(struct som_attrs, som_ioepoch));
-   LASSERTF((int)sizeof(((struct som_attrs *)0)-som_ioepoch) == 8, found 
%lld\n,
-(long long)(int)sizeof(((struct som_attrs *)0)-som_ioepoch));
-   LASSERTF((int)offsetof(struct som_attrs, som_size) == 16, found 
%lld\n,
-(long long)(int)offsetof(struct som_attrs, som_size));
-   LASSERTF((int)sizeof(((struct som_attrs *)0)-som_size) == 8, found 
%lld\n,
-(long long)(int)sizeof(((struct som_attrs *)0)-som_size));
-   LASSERTF((int)offsetof(struct som_attrs, som_blocks) == 24, found 
%lld\n,
-(long long)(int)offsetof(struct som_attrs, som_blocks));
-   LASSERTF((int)sizeof(((struct som_attrs *)0)-som_blocks) == 8, found 
%lld\n,
-(long long)(int)sizeof(((struct som_attrs *)0)-som_blocks));
-   LASSERTF((int)offsetof(struct som_attrs, som_mountid) == 32, found 
%lld\n,
-(long long)(int)offsetof(struct som_attrs, som_mountid));
-   LASSERTF((int)sizeof(((struct som_attrs *)0)-som_mountid) == 8, found 
%lld\n,
-(long long)(int)sizeof(((struct som_attrs *)0)-som_mountid));
-
-   /* Checks for struct hsm_attrs */
-   LASSERTF((int)sizeof(struct hsm_attrs) == 24, found %lld\n,
-(long long)(int)sizeof(struct hsm_attrs));
-   LASSERTF((int)offsetof(struct hsm_attrs, hsm_compat) == 0, found 
%lld\n,
-(long long)(int)offsetof(struct hsm_attrs, hsm_compat));
-   LASSERTF((int)sizeof(((struct hsm_attrs *)0)-hsm_compat) == 4, found 
%lld\n,
-(long long)(int)sizeof(((struct hsm_attrs *)0)-hsm_compat));
-   LASSERTF((int)offsetof(struct hsm_attrs, hsm_flags) == 4, found 
%lld\n,
-(long 

[PATCH 10/12] staging/lustre/obdclass: remove llog_osd.c

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

llog_osd_ops is not used so remove it and its supporting methods.

Signed-off-by: John L. Hammond john.hamm...@intel.com
---
 drivers/staging/lustre/lustre/include/lustre_log.h |9 -
 drivers/staging/lustre/lustre/obdclass/Makefile|2 +-
 drivers/staging/lustre/lustre/obdclass/llog_osd.c  | 1290 
 3 files changed, 1 insertion(+), 1300 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_osd.c

diff --git a/drivers/staging/lustre/lustre/include/lustre_log.h 
b/drivers/staging/lustre/lustre/include/lustre_log.h
index 3944c6d..ed97887 100644
--- a/drivers/staging/lustre/lustre/include/lustre_log.h
+++ b/drivers/staging/lustre/lustre/include/lustre_log.h
@@ -313,15 +313,6 @@ struct llog_handle {
atomic_t lgh_refcount;
 };
 
-/* llog_osd.c */
-extern struct llog_operations llog_osd_ops;
-int llog_osd_get_cat_list(const struct lu_env *env, struct dt_device *d,
- int idx, int count,
- struct llog_catid *idarray);
-int llog_osd_put_cat_list(const struct lu_env *env, struct dt_device *d,
- int idx, int count,
- struct llog_catid *idarray);
-
 #define LLOG_CTXT_FLAG_UNINITIALIZED 0x0001
 #define LLOG_CTXT_FLAG_STOP 0x0002
 
diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile 
b/drivers/staging/lustre/lustre/obdclass/Makefile
index 9a2b83f..c8c95e1 100644
--- a/drivers/staging/lustre/lustre/obdclass/Makefile
+++ b/drivers/staging/lustre/lustre/obdclass/Makefile
@@ -3,7 +3,7 @@ obj-$(CONFIG_LUSTRE_FS) += obdclass.o
 obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \
  llog.o llog_cat.o llog_obd.o llog_swab.o class_obd.o debug.o \
  genops.o uuid.o llog_ioctl.o lprocfs_status.o\
- lustre_handles.o lustre_peer.o llog_osd.o \
+ lustre_handles.o lustre_peer.o \
  local_storage.o statfs_pack.o obdo.o obd_config.o obd_mount.o\
  lu_object.o dt_object.o capa.o cl_object.o   \
  cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o
diff --git a/drivers/staging/lustre/lustre/obdclass/llog_osd.c 
b/drivers/staging/lustre/lustre/obdclass/llog_osd.c
deleted file mode 100644
index 2c6a51e..000
--- a/drivers/staging/lustre/lustre/obdclass/llog_osd.c
+++ /dev/null
@@ -1,1290 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2012, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * lustre/obdclass/llog_osd.c - low level llog routines on top of OSD API
- *
- * Author: Alexey Zhuravlev alexey.zhurav...@intel.com
- * Author: Mikhail Pershin mike.pers...@intel.com
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#include ../include/obd.h
-#include ../include/obd_class.h
-#include ../include/lustre_fid.h
-#include ../include/dt_object.h
-
-#include llog_internal.h
-#include local_storage.h
-
-/*
- * - multi-chunks or big-declaration approach
- * - use unique sequence instead of llog sb tracking unique ids
- * - re-use existing environment
- * - named llog support (can be used for testing only at the present)
- * - llog_origin_connect() work with OSD API
- */
-
-static int llog_osd_declare_new_object(const struct lu_env *env,
-  struct local_oid_storage *los,
-  struct dt_object *o,
-  struct thandle *th)
-{
-   struct llog_thread_info *lgi = llog_info(env);
-
-   lgi-lgi_attr.la_valid = LA_MODE;
-   lgi-lgi_attr.la_mode = S_IFREG | S_IRUGO | S_IWUSR;
-   lgi-lgi_dof.dof_type = dt_mode_to_dft(S_IFREG);
-
-   return local_object_declare_create(env, los, o, 

[PATCH 09/12] staging/lustre/obdclass: remove llog_test.ko

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

The llog_test module requires server support (it needs a local MGS to
function) and should not have been included.

Signed-off-by: John L. Hammond john.hamm...@intel.com
---
 drivers/staging/lustre/lustre/obdclass/Makefile|2 +-
 drivers/staging/lustre/lustre/obdclass/llog_test.c | 1072 
 2 files changed, 1 insertion(+), 1073 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_test.c

diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile 
b/drivers/staging/lustre/lustre/obdclass/Makefile
index f1dcf8e..9a2b83f 100644
--- a/drivers/staging/lustre/lustre/obdclass/Makefile
+++ b/drivers/staging/lustre/lustre/obdclass/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_LUSTRE_FS) += obdclass.o llog_test.o
+obj-$(CONFIG_LUSTRE_FS) += obdclass.o
 
 obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \
  llog.o llog_cat.o llog_obd.o llog_swab.o class_obd.o debug.o \
diff --git a/drivers/staging/lustre/lustre/obdclass/llog_test.c 
b/drivers/staging/lustre/lustre/obdclass/llog_test.c
deleted file mode 100644
index ef008ab..000
--- a/drivers/staging/lustre/lustre/obdclass/llog_test.c
+++ /dev/null
@@ -1,1072 +0,0 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2012, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * lustre/obdclass/llog_test.c
- *
- * Author: Phil Schwan p...@clusterfs.com
- * Author: Mikhail Pershin mike.pers...@intel.com
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include linux/module.h
-#include linux/init.h
-
-#include ../include/obd_class.h
-#include ../include/lustre_fid.h
-#include ../include/lustre_log.h
-
-/* This is slightly more than the number of records that can fit into a
- * single llog file, because the llog_log_header takes up some of the
- * space in the first block that cannot be used for the bitmap. */
-#define LLOG_TEST_RECNUM  (LLOG_CHUNK_SIZE * 8)
-
-static int llog_test_rand;
-static struct obd_uuid uuid = { .uuid = test_uuid };
-static struct llog_logid cat_logid;
-
-struct llog_mini_rec {
-   struct llog_rec_hdr lmr_hdr;
-   struct llog_rec_taillmr_tail;
-} __attribute__((packed));
-
-static int verify_handle(char *test, struct llog_handle *llh, int num_recs)
-{
-   int i;
-   int last_idx = 0;
-   int active_recs = 0;
-
-   for (i = 0; i  LLOG_BITMAP_BYTES * 8; i++) {
-   if (ext2_test_bit(i, llh-lgh_hdr-llh_bitmap)) {
-   last_idx = i;
-   active_recs++;
-   }
-   }
-
-   if (active_recs != num_recs) {
-   CERROR(%s: expected %d active recs after write, found %d\n,
-  test, num_recs, active_recs);
-   return -ERANGE;
-   }
-
-   if (llh-lgh_hdr-llh_count != num_recs) {
-   CERROR(%s: handle-count is %d, expected %d after write\n,
-  test, llh-lgh_hdr-llh_count, num_recs);
-   return -ERANGE;
-   }
-
-   if (llh-lgh_last_idx  last_idx) {
-   CERROR(%s: handle-last_idx is %d, expected %d after write\n,
-  test, llh-lgh_last_idx, last_idx);
-   return -ERANGE;
-   }
-
-   return 0;
-}
-
-/* Test named-log create/open, close */
-static int llog_test_1(const struct lu_env *env,
-  struct obd_device *obd, char *name)
-{
-   struct llog_handle  *llh;
-   struct llog_ctxt*ctxt;
-   int rc;
-   int rc2;
-
-   CWARN(1a: create a log with name: %s\n, name);
-   ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-   LASSERT(ctxt);
-
-   rc = llog_open_create(env, ctxt, llh, NULL, name);
-   if (rc) {
-   CERROR(1a: 

[PATCH 11/12] staging/lustre/mdc: remove obsolete llog ioctl handlers

2014-08-30 Thread Oleg Drokin
From: John L. Hammond john.hamm...@intel.com

In mdc_iocontrol() remove the handlers for the obsolete llog ioctls
OBD_IOC_PARSE, OBD_IOC_LLOG_INFO, and OBD_IOC_LLOG_PRINT.

Signed-off-by: John L. Hammond john.hamm...@intel.com
Signed-off-by: Oleg Drokin gr...@linuxhacker.ru
---
 drivers/staging/lustre/lustre/mdc/mdc_request.c | 15 ---
 1 file changed, 15 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c 
b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index a2a6334..e6e2515 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1830,7 +1830,6 @@ static int mdc_iocontrol(unsigned int cmd, struct 
obd_export *exp, int len,
struct obd_device *obd = exp-exp_obd;
struct obd_ioctl_data *data = karg;
struct obd_import *imp = obd-u.cli.cl_import;
-   struct llog_ctxt *ctxt;
int rc;
 
if (!try_module_get(THIS_MODULE)) {
@@ -1886,20 +1885,6 @@ static int mdc_iocontrol(unsigned int cmd, struct 
obd_export *exp, int len,
case IOC_OSC_SET_ACTIVE:
rc = ptlrpc_set_import_active(imp, data-ioc_offset);
goto out;
-   case OBD_IOC_PARSE: {
-   ctxt = llog_get_context(exp-exp_obd, LLOG_CONFIG_REPL_CTXT);
-   rc = class_config_parse_llog(NULL, ctxt, data-ioc_inlbuf1,
-NULL);
-   llog_ctxt_put(ctxt);
-   goto out;
-   }
-   case OBD_IOC_LLOG_INFO:
-   case OBD_IOC_LLOG_PRINT: {
-   ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
-   rc = llog_ioctl(NULL, ctxt, cmd, data);
-   llog_ctxt_put(ctxt);
-   goto out;
-   }
case OBD_IOC_POLL_QUOTACHECK:
rc = mdc_quota_poll_check(exp, (struct if_quotacheck *)karg);
goto out;
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/4] staging: rtl8188eu: osdep_intf.h and usb_intf.c

2014-08-30 Thread Miguel Oliveira
 Same comments as the previous ones, please redo all of these patches.

Should all the alterations be in one big single patch, insted of small ones?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: rtl8188eu: rtw_debug.h

2014-08-30 Thread Miguel Oliveira

 How does this change relate to what you said you were going to do above?

 confused,

That was a fix for a sparse warning that went on this patch acidenttly.
Sorry about that.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC v2 3/8] component: add support for component match array

2014-08-30 Thread Russell King - ARM Linux
On Thu, Jul 03, 2014 at 12:26:39AM +0900, Inki Dae wrote:
 2014-07-01 23:22 GMT+09:00 Russell King - ARM Linux li...@arm.linux.org.uk:
  On Thu, Jun 26, 2014 at 03:46:01PM +0100, Russell King - ARM Linux wrote:
  On Thu, Jun 26, 2014 at 02:34:17PM +0200, Philipp Zabel wrote:
   Hi Russell,
  
   On Tue, Jun 24, 2014 at 9:29 PM, Russell King
   rmk+ker...@arm.linux.org.uk wrote:
   [...]
+/*
+ * Add a component to be matched.
+ *
+ * The match array is first created or extended if necessary.
+ */
+void component_match_add(struct device *dev, struct component_match 
**matchptr,
+   int (*compare)(struct device *, void *), void *compare_data)
+{
+   struct component_match *match = *matchptr;
+
+   if (IS_ERR(match))
+   return;
+
+   if (!match || match-num == match-alloc) {
+   size_t new_size = match ? match-alloc + 16 : 15;
+
+   match = component_match_realloc(dev, match, new_size);
+
+   *matchptr = match;
+
+   if (IS_ERR(match))
+   return;
+   }
+
+   match-compare[match-num].fn = compare;
+   match-compare[match-num].data = compare_data;
+   match-num++;
+}
  
   component_match_add should be exported.
 
  Fixed, thanks.
 
  As there's no further comments, and Inki Dae has not responded, I'm
 
 It's has been just a week. I will check and look into your patch
 series. I think Exynos drm should also be considered for the use of
 component match array.

It has now been almost two months.  What's happening on this?

Please note that I'm planning to push the rest of the component updates
during the next merge window, which will result in unconverted drivers
breaking.

Thanks.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/4] staging: rtl8188eu: osdep_intf.h and usb_intf.c

2014-08-30 Thread Greg KH
On Sat, Aug 30, 2014 at 11:22:56PM +0200, Miguel Oliveira wrote:
  Same comments as the previous ones, please redo all of these patches.
 
 Should all the alterations be in one big single patch, insted of small ones?

I don't know, I don't remember what this patch even contained given that
it was 100+ patches ago in my review queue and I have the short term
memory of a squirrel.  Please fix up and resend and I'll be glad to
review it then.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings

2014-08-30 Thread Greg Kroah-Hartman
On Sun, Aug 31, 2014 at 03:16:48AM +0300, Ramon Fried wrote:
 This patch fixes the following checkpatch.pl warnings:
 
 WARNING: Possible unnecessary 'out of memory' message
 #146: FILE: ./xlr_net.c:146:
 +   if (!skb) {
 +   pr_err(SKB allocation failed\n);
 
 WARNING: Missing a blank line after declarations
 #1107: FILE: ./xlr_net.c:1107:
 +   struct xlr_net_priv *priv = platform_get_drvdata(pdev);
 +   unregister_netdev(priv-ndev);
 
 Signed-off-by: Ramon Fried ramon.fr...@gmail.com

This is two different things, and as such, should be sent in 2 different
patches?

Also, you sent this to a lot of people, did they all really need it?

 ---
  drivers/staging/netlogic/xlr_net.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/staging/netlogic/xlr_net.c 
 b/drivers/staging/netlogic/xlr_net.c
 index 9bf407d..28a42831 100644
 --- a/drivers/staging/netlogic/xlr_net.c
 +++ b/drivers/staging/netlogic/xlr_net.c
 @@ -142,10 +142,8 @@ static inline struct sk_buff *xlr_alloc_skb(void)
  
   /* skb-data is cache aligned */
   skb = alloc_skb(XLR_RX_BUF_SIZE, GFP_ATOMIC);
 - if (!skb) {
 - pr_err(SKB allocation failed\n);
 + if (!skb)
   return NULL;
 - }
   mac_put_skb_back_ptr(skb);
   return skb;
  }
 @@ -1104,6 +1102,7 @@ err_gmac:
  static int xlr_net_remove(struct platform_device *pdev)
  {
   struct xlr_net_priv *priv = platform_get_drvdata(pdev);
 +
   unregister_netdev(priv-ndev);
   mdiobus_unregister(priv-mii_bus);
   mdiobus_free(priv-mii_bus);

Finally, this patch doesn't apply at all to my tree, so even if I wanted
to apply it, I couldn't.  Please refresh it against the staging-next
branch of the staging.git tree on git.kernel.org, and if it is still
relevant (hint, half of it isn't), then redo it and resend.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv2 3/4] staging:lustre:lnet: lib-md.c erase C99 // comments

2014-08-30 Thread Janet Liu
After changing the comments format, the other error disappears.
So silences two checkpatch errors:
  ERROR: do not use C99 // comments
  ERROR: trailing statements should be on next line

Signed-off-by: Janet Liu jianhua@gmail.com
---
 drivers/staging/lustre/lnet/lnet/lib-md.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c 
b/drivers/staging/lustre/lnet/lnet/lib-md.c
index ca08703..5b9c93a 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-md.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-md.c
@@ -125,7 +125,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
if ((umd-options  LNET_MD_MAX_SIZE) != 0  /* max size used 
*/
(umd-max_size  0 ||
-umd-max_size  total_length)) // illegal max_size
+umd-max_size  total_length)) /* illegal max_size */
return -EINVAL;
 
} else if ((umd-options  LNET_MD_KIOV) != 0) {
@@ -146,7 +146,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
if ((umd-options  LNET_MD_MAX_SIZE) != 0  /* max size used 
*/
(umd-max_size  0 ||
-umd-max_size  total_length)) // illegal max_size
+umd-max_size  total_length)) /* illegal max_size */
return -EINVAL;
} else {   /* contiguous */
lmd-md_length = umd-length;
@@ -156,7 +156,7 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
if ((umd-options  LNET_MD_MAX_SIZE) != 0  /* max size used 
*/
(umd-max_size  0 ||
-umd-max_size  (int)umd-length)) // illegal max_size
+umd-max_size  (int)umd-length)) /* illegal max_size */
return -EINVAL;
}
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: bcm: fixed a comment coding style issue

2014-08-30 Thread Anh Le
Fixed a C99 comment issue in InterfaceMisc.h.

Signed-off-by: Anh Le anhlq2...@gmail.com
---
 drivers/staging/bcm/InterfaceMisc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/bcm/InterfaceMisc.h 
b/drivers/staging/bcm/InterfaceMisc.h
index efb6860..0e5e38b 100644
--- a/drivers/staging/bcm/InterfaceMisc.h
+++ b/drivers/staging/bcm/InterfaceMisc.h
@@ -39,4 +39,4 @@ VOID Bcm_kill_all_URBs(struct bcm_interface_adapter 
*psIntfAdapter);
 
 #define DISABLE_USB_ZERO_LEN_INT 0x0F011878
 
-#endif // __INTERFACE_MISC_H
+#endif /* __INTERFACE_MISC_H */
-- 
1.8.5.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel