[PATCH] staging: lustre: lmv: mark symbols static where possible

2016-09-17 Thread Baoyou Xie
We get a few warnings when building kernel with W=1:
drivers/staging/lustre/lustre/lmv/lmv_obd.c:1640:1: warning: no previous 
prototype for 'lmv_locate_target_for_name' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2421:5: warning: no previous 
prototype for 'lmv_read_page' [-Wmissing-prototypes]


In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie 
---
 drivers/staging/lustre/lustre/lmv/lmv_obd.c | 38 -
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c 
b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
index dc752d5..5783359 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
@@ -1636,7 +1636,7 @@ static int lmv_close(struct obd_export *exp, struct 
md_op_data *op_data,
  * For striped-directory, it will locate MDT by name. And also
  * it will reset op_fid1 with the FID of the chosen stripe.
  **/
-struct lmv_tgt_desc *
+static struct lmv_tgt_desc *
 lmv_locate_target_for_name(struct lmv_obd *lmv, struct lmv_stripe_md *lsm,
   const char *name, int namelen, struct lu_fid *fid,
   u32 *mds)
@@ -2418,9 +2418,9 @@ static int lmv_read_striped_page(struct obd_export *exp,
return rc;
 }
 
-int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data,
- struct md_callback *cb_op, __u64 offset,
- struct page **ppage)
+static int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data,
+struct md_callback *cb_op, __u64 offset,
+struct page **ppage)
 {
struct lmv_stripe_md *lsm = op_data->op_mea1;
struct obd_device *obd = exp->exp_obd;
@@ -2771,8 +2771,9 @@ static int lmv_pack_md_v1(const struct lmv_stripe_md *lsm,
return 0;
 }
 
-int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm,
-   int stripe_count)
+static int
+lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm,
+   int stripe_count)
 {
int lmm_size = 0, rc = 0;
bool allocated = false;
@@ -2966,15 +2967,15 @@ int lmv_unpack_md(struct obd_export *exp, struct 
lmv_stripe_md **lsmp,
 }
 EXPORT_SYMBOL(lmv_unpack_md);
 
-int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
-struct lov_mds_md *lmm, int disk_len)
+static int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
+   struct lov_mds_md *lmm, int disk_len)
 {
return lmv_unpack_md(exp, (struct lmv_stripe_md **)lsmp,
 (union lmv_mds_md *)lmm, disk_len);
 }
 
-int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
-  struct lov_stripe_md *lsm)
+static int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
+ struct lov_stripe_md *lsm)
 {
const struct lmv_stripe_md *lmv = (struct lmv_stripe_md *)lsm;
struct obd_device *obd = exp->exp_obd;
@@ -3177,9 +3178,10 @@ static int lmv_revalidate_lock(struct obd_export *exp, 
struct lookup_intent *it,
return rc;
 }
 
-int lmv_get_fid_from_lsm(struct obd_export *exp,
-const struct lmv_stripe_md *lsm,
-const char *name, int namelen, struct lu_fid *fid)
+static int
+lmv_get_fid_from_lsm(struct obd_export *exp,
+const struct lmv_stripe_md *lsm,
+const char *name, int namelen, struct lu_fid *fid)
 {
const struct lmv_oinfo *oinfo;
 
@@ -3269,14 +3271,16 @@ static int lmv_quotacheck(struct obd_device *unused, 
struct obd_export *exp,
return rc;
 }
 
-int lmv_update_lsm_md(struct obd_export *exp, struct lmv_stripe_md *lsm,
- struct mdt_body *body, ldlm_blocking_callback cb_blocking)
+static int
+lmv_update_lsm_md(struct obd_export *exp, struct lmv_stripe_md *lsm,
+ struct mdt_body *body, ldlm_blocking_callback cb_blocking)
 {
return lmv_revalidate_slaves(exp, body, lsm, cb_blocking, 0);
 }
 
-int lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm,
-  struct cl_attr *attr)
+static int
+lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm,
+  struct cl_attr *attr)
 {
int i;
 
-- 
2.7.4

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


[PATCH] staging/lustre: clean function declaration in cl_io.c up

2016-09-17 Thread Baoyou Xie
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/cl_page.c:488:6: warning: no previous 
prototype for 'cl_page_disown0' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/obdclass/cl_io.c, but should be
removed in a header file. thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lustre/include/cl_object.h.

Signed-off-by: Baoyou Xie 
---
 drivers/staging/lustre/lustre/include/cl_object.h | 2 ++
 drivers/staging/lustre/lustre/obdclass/cl_io.c| 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/cl_object.h 
b/drivers/staging/lustre/lustre/include/cl_object.h
index 5e63a27..41e0801 100644
--- a/drivers/staging/lustre/lustre/include/cl_object.h
+++ b/drivers/staging/lustre/lustre/include/cl_object.h
@@ -2254,6 +2254,8 @@ void cl_page_unassume(const struct lu_env *env,
  struct cl_io *io, struct cl_page *pg);
 void cl_page_disown(const struct lu_env *env,
struct cl_io *io, struct cl_page *page);
+void cl_page_disown0(const struct lu_env *env,
+struct cl_io *io, struct cl_page *pg);
 int cl_page_is_owned(const struct cl_page *pg, const struct cl_io *io);
 
 /** @} ownership */
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c 
b/drivers/staging/lustre/lustre/obdclass/cl_io.c
index 4516fff..6643e78 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_io.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c
@@ -936,8 +936,6 @@ void cl_page_list_splice(struct cl_page_list *list, struct 
cl_page_list *head)
 }
 EXPORT_SYMBOL(cl_page_list_splice);
 
-void cl_page_disown0(const struct lu_env *env,
-struct cl_io *io, struct cl_page *pg);
 
 /**
  * Disowns pages in a queue.
-- 
2.7.4

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


[PATCH] staging: lustre: obdclass: clean function declarations in obd_config.c and class_obd.c up

2016-09-17 Thread Baoyou Xie
We get 3 warnings when building kernel with W=1:

drivers/staging/lustre/lustre/obdclass/obd_mount.c:705:5: warning: no previous 
prototype for 'lustre_check_exclusion' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1226:5: warning: no previous 
prototype for 'lustre_register_fs' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1231:5: warning: no previous 
prototype for 'lustre_unregister_fs' [-Wmissing-prototypes]

In fact, the first function is declared in
drivers/staging/lustre/lustre/obdclass/obd_config.c,
and the other two functions are declared in
drivers/staging/lustre/lustre/obdclass/class_obd.c,
but all of these functions should be declared in 
a header file, thus can be recognized in other file.

So this patch moves the declarations into
drivers/staging/lustre/lustre/include/obd_class.h.

Signed-off-by: Baoyou Xie 
---
 drivers/staging/lustre/lustre/include/obd_class.h   | 3 +++
 drivers/staging/lustre/lustre/obdclass/class_obd.c  | 4 
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 --
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/obd_class.h 
b/drivers/staging/lustre/lustre/include/obd_class.h
index 9965a01..4a8a459 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -1696,6 +1696,9 @@ struct lwp_register_item {
 extern int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
 
 /* obd_mount.c */
+int lustre_unregister_fs(void);
+int lustre_register_fs(void);
+int lustre_check_exclusion(struct super_block *sb, char *svname);
 
 /* sysctl.c */
 int obd_sysctl_init(void);
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c 
b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 397929a..381b8ba 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -451,8 +451,6 @@ static int __init obdclass_init(void)
 {
int i, err;
 
-   int lustre_register_fs(void);
-
LCONSOLE_INFO("Lustre: Build Version: " LUSTRE_VERSION_STRING "\n");
 
spin_lock_init(&obd_types_lock);
@@ -519,8 +517,6 @@ static int __init obdclass_init(void)
 
 static void obdclass_exit(void)
 {
-   int lustre_unregister_fs(void);
-
lustre_unregister_fs();
 
misc_deregister(&obd_psdev);
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index b7dcadb..036f396 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1047,8 +1047,6 @@ int class_process_proc_param(char *prefix, struct 
lprocfs_vars *lvars,
 }
 EXPORT_SYMBOL(class_process_proc_param);
 
-extern int lustre_check_exclusion(struct super_block *sb, char *svname);
-
 /** Parse a configuration llog, doing various manipulations on them
  * for various reasons, (modifications for compatibility, skip obsolete
  * records, change uuids, etc), then class_process_config() resulting
-- 
2.7.4

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


[PATCH] staging/lustre: clean function declaration in super25.c up

2016-09-17 Thread Baoyou Xie
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/obd_config.c:719:6: warning: no previous 
prototype for 'lustre_register_client_process_config' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lustre/include/lprocfs_status.h.

Signed-off-by: Baoyou Xie 
---
 drivers/staging/lustre/lustre/include/lprocfs_status.h | 3 +++
 drivers/staging/lustre/lustre/llite/super25.c  | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h 
b/drivers/staging/lustre/lustre/include/lprocfs_status.h
index ff35e63..6768ecc 100644
--- a/drivers/staging/lustre/lustre/include/lprocfs_status.h
+++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h
@@ -363,6 +363,9 @@ static inline void s2dhms(struct dhms *ts, time64_t secs64)
 #define JOBSTATS_PROCNAME_UID  "procname_uid"
 #define JOBSTATS_NODELOCAL "nodelocal"
 
+/* obd_config.c */
+void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg 
*lcfg));
+
 int lprocfs_write_frac_helper(const char __user *buffer,
  unsigned long count, int *val, int mult);
 int lprocfs_read_frac_helper(char *buffer, unsigned long count,
diff --git a/drivers/staging/lustre/lustre/llite/super25.c 
b/drivers/staging/lustre/lustre/llite/super25.c
index 883084e..24c79c2 100644
--- a/drivers/staging/lustre/lustre/llite/super25.c
+++ b/drivers/staging/lustre/lustre/llite/super25.c
@@ -83,8 +83,6 @@ struct super_operations lustre_super_operations = {
 };
 MODULE_ALIAS_FS("lustre");
 
-void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg 
*lcfg));
-
 static int __init lustre_init(void)
 {
lnet_process_id_t lnet_id;
-- 
2.7.4

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


[PATCH] staging: lustre: clean function declaration in super25.c up

2016-09-17 Thread Baoyou Xie
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lnet/selftest/conctl.c:804:1: warning: no previous 
prototype for 'lstcon_ioctl_entry' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lnet/selftest/console.h

Signed-off-by: Baoyou Xie 
---
 drivers/staging/lustre/lnet/selftest/console.c | 2 --
 drivers/staging/lustre/lnet/selftest/console.h | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 4c33621..a0fcbf3 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -1993,8 +1993,6 @@ static void lstcon_init_acceptor_service(void)
lstcon_acceptor_service.sv_wi_total = SFW_FRWK_WI_MAX;
 }
 
-extern int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr);
-
 static DECLARE_IOCTL_HANDLER(lstcon_ioctl_handler, lstcon_ioctl_entry);
 
 /* initialize console */
diff --git a/drivers/staging/lustre/lnet/selftest/console.h 
b/drivers/staging/lustre/lnet/selftest/console.h
index 78b1477..78388a6 100644
--- a/drivers/staging/lustre/lnet/selftest/console.h
+++ b/drivers/staging/lustre/lnet/selftest/console.h
@@ -184,6 +184,7 @@ lstcon_id2hash(lnet_process_id_t id, struct list_head *hash)
return &hash[idx];
 }
 
+int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr);
 int lstcon_console_init(void);
 int lstcon_console_fini(void);
 int lstcon_session_match(lst_sid_t sid);
-- 
2.7.4

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


[PATCH] rtl8xxxu: Stop log spam from each successful interrupt

2016-09-17 Thread Larry Finger
As soon as debugging is turned on, the logs are filled with messages
reporting the interrupt status. As this quantity is usually zero, this
output is not needed. In fact, there will be a report if the status is
not zero, thus the debug line in question could probably be deleted.
Rather than taking that action, I have changed it to only be printed
when the RTL8XXXU_DEBUG_USB bit is set in the debug mask.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 
b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 9f6dbb4..236f33c 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -5260,7 +5260,8 @@ static void rtl8xxxu_int_complete(struct urb *urb)
struct device *dev = &priv->udev->dev;
int ret;
 
-   dev_dbg(dev, "%s: status %i\n", __func__, urb->status);
+   if (rtl8xxxu_debug & RTL8XXXU_DEBUG_USB)
+   dev_dbg(dev, "%s: status %i\n", __func__, urb->status);
if (urb->status == 0) {
usb_anchor_urb(urb, &priv->int_anchor);
ret = usb_submit_urb(urb, GFP_ATOMIC);
-- 
2.6.6

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


Re: [PATCH] rtl8xxxu: Stop log spam from each successful interrupt

2016-09-17 Thread Joe Perches
On Sat, 2016-09-17 at 12:09 -0500, Larry Finger wrote:
> As soon as debugging is turned on, the logs are filled with messages
> reporting the interrupt status. As this quantity is usually zero, this
> output is not needed. In fact, there will be a report if the status is
> not zero, thus the debug line in question could probably be deleted.
> Rather than taking that action, I have changed it to only be printed
> when the RTL8XXXU_DEBUG_USB bit is set in the debug mask.

There are many uses of
if (rtl8xxxu_debug & ) {
dev_info(dev, ...)

Emitting debugging information at KERN_INFO is odd.

I think it'd be nicer to use dev_dbg for all these cases
and as well use some new macro that includes the test

Something like:

#define rtl8xxxu_dbg(type, fmt, ...)\
do {\
if (rtl8xxxu_debug & (type))\
dev_dbg(dev, fmt, ##__VA_ARGS__);   \
} while (0)

> Signed-off-by: Larry Finger 
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index 9f6dbb4..236f33c 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -5260,7 +5260,8 @@ static void rtl8xxxu_int_complete(struct urb *urb)
>   struct device *dev = &priv->udev->dev;
>   int ret;
>  
> - dev_dbg(dev, "%s: status %i\n", __func__, urb->status);
> + if (rtl8xxxu_debug & RTL8XXXU_DEBUG_USB)
> + dev_dbg(dev, "%s: status %i\n", __func__, urb->status);
>   if (urb->status == 0) {
>   usb_anchor_urb(urb, &priv->int_anchor);
>   ret = usb_submit_urb(urb, GFP_ATOMIC);
> 
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv2] staging: wlan-ng: if statement style cleanup

2016-09-17 Thread Greg Kroah-Hartman
On Fri, Sep 16, 2016 at 10:42:21AM -0400, Jon Eyolfson wrote:
> Changed if statement bodies from 2 levels deeper than if statement to 1.
> 
> Signed-off-by: Jon Eyolfson 
> ---
>  drivers/staging/wlan-ng/cfg80211.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/cfg80211.c 
> b/drivers/staging/wlan-ng/cfg80211.c
> index a36e40d..457f176 100644
> --- a/drivers/staging/wlan-ng/cfg80211.c
> +++ b/drivers/staging/wlan-ng/cfg80211.c
> @@ -476,11 +476,11 @@ static int prism2_connect(struct wiphy *wiphy, struct 
> net_device *dev,
>  
> /* Set the authorization */
> if ((sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM) ||
> -   ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && !is_wep))
> -   msg_join.authtype.data = 
> P80211ENUM_authalg_opensystem;
> +   ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && !is_wep))
> +   msg_join.authtype.data = P80211ENUM_authalg_opensystem;
> else if ((sme->auth_type == NL80211_AUTHTYPE_SHARED_KEY) ||
> -   ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep))
> -   msg_join.authtype.data = P80211ENUM_authalg_sharedkey;
> +((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep))
> +   msg_join.authtype.data = P80211ENUM_authalg_sharedkey;
> else
> netdev_warn(dev,
> "Unhandled authorisation type for connect (%d)\n",

Your email client ate the tabs and spit out spaces, making this
impossible to be applied.  Please fix up and resend.

thanks,

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


[PATCH] Staging: dgnc: dgnc_tty: fixed a line too long style issue

2016-09-17 Thread Cathal Mullaney
Fixed a coding style issue.

Signed-off-by: Cathal Mullaney 
---
 drivers/staging/dgnc/dgnc_tty.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 31b18e6..fd46ef0 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -186,7 +186,8 @@ int dgnc_tty_register(struct dgnc_board *brd)
if (IS_ERR(brd->serial_driver))
return PTR_ERR(brd->serial_driver);
 
-   snprintf(brd->serial_name, MAXTTYNAMELEN, "tty_dgnc_%d_", 
brd->boardnum);
+   snprintf(brd->serial_name, MAXTTYNAMELEN, "tty_dgnc_%d_",
+brd->boardnum);
 
brd->serial_driver->name = brd->serial_name;
brd->serial_driver->name_base = 0;
-- 
2.7.4

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


Re: [PATCH] rtl8xxxu: Stop log spam from each successful interrupt

2016-09-17 Thread Jes Sorensen
Joe Perches  writes:
> On Sat, 2016-09-17 at 12:09 -0500, Larry Finger wrote:
>> As soon as debugging is turned on, the logs are filled with messages
>> reporting the interrupt status. As this quantity is usually zero, this
>> output is not needed. In fact, there will be a report if the status is
>> not zero, thus the debug line in question could probably be deleted.
>> Rather than taking that action, I have changed it to only be printed
>> when the RTL8XXXU_DEBUG_USB bit is set in the debug mask.
>
> There are many uses of
>   if (rtl8xxxu_debug & ) {
>   dev_info(dev, ...)
>
> Emitting debugging information at KERN_INFO is odd.

Not at all, it's a pain to enable it in debug fs post loading the
driver, especially if you need the output immediately during driver
init. That is why the flags are there.

> I think it'd be nicer to use dev_dbg for all these cases
> and as well use some new macro that includes the test
>
> Something like:
>
> #define rtl8xxxu_dbg(type, fmt, ...)  \
> do {  \
>   if (rtl8xxxu_debug & (type))\
>   dev_dbg(dev, fmt, ##__VA_ARGS__);   \
> } while (0)

Yuck yuck yuck, no thanks!

Any attempt of adding that kinda grossness to the driver will get a
NACK.

There is a reason the debug flag is there - it allows you to enable
specific items on driver load. If you enable that flag, expect to see
stuff in your log.

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


Re: [PATCH] rtl8xxxu: Stop log spam from each successful interrupt

2016-09-17 Thread Jes Sorensen
Larry Finger  writes:
> As soon as debugging is turned on, the logs are filled with messages
> reporting the interrupt status. As this quantity is usually zero, this
> output is not needed. In fact, there will be a report if the status is
> not zero, thus the debug line in question could probably be deleted.
> Rather than taking that action, I have changed it to only be printed
> when the RTL8XXXU_DEBUG_USB bit is set in the debug mask.

Wrong flag, please add a RTL8XXXU_DEBUG_INTERRUPT flag instead and use
that.

Which device do you see this with?

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


[PATCH] Staging: octeon: ethernet-rx: fixed three redundant blank line style issues

2016-09-17 Thread Cathal Mullaney
Fixed three minor coding style issues.

Signed-off-by: Cathal Mullaney 
---
 drivers/staging/octeon/ethernet-rx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-rx.c 
b/drivers/staging/octeon/ethernet-rx.c
index ce1e2a3..f0900d1 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -450,12 +450,10 @@ void cvm_oct_poll_controller(struct net_device *dev)
return;
 
for (i = 0; i < ARRAY_SIZE(oct_rx_group); i++) {
-
if (!(pow_receive_groups & BIT(i)))
continue;
 
cvm_oct_poll(&oct_rx_group[i], 16);
-
}
 }
 #endif
@@ -537,7 +535,6 @@ void cvm_oct_rx_shutdown(void)
int i;
 
for (i = 0; i < ARRAY_SIZE(oct_rx_group); i++) {
-
if (!(pow_receive_groups & BIT(i)))
continue;
 
-- 
2.7.4

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


Re: [PATCH] rtl8xxxu: Stop log spam from each successful interrupt

2016-09-17 Thread Larry Finger

On 09/17/2016 03:59 PM, Jes Sorensen wrote:

Larry Finger  writes:

As soon as debugging is turned on, the logs are filled with messages
reporting the interrupt status. As this quantity is usually zero, this
output is not needed. In fact, there will be a report if the status is
not zero, thus the debug line in question could probably be deleted.
Rather than taking that action, I have changed it to only be printed
when the RTL8XXXU_DEBUG_USB bit is set in the debug mask.


Wrong flag, please add a RTL8XXXU_DEBUG_INTERRUPT flag instead and use
that.

Which device do you see this with?


OK. I will change the flag.

I found this with a TP-Link TL-MN8200ND, which has some variant of the RTL8188CU 
chip. It transmits, but I see no evidence that the receiver is functioning at 
all. The same is true for driver rtl8192cu. Only the driver from Realtek's web 
site actually works.


One other problem that I have found is that the debug option on module load 
seems to be ignored. So far, I've had to hard wire the flags. Once I find the 
reason, I'll send a patch for that as well.


Larry


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


[PATCHv3] staging: wlan-ng: if statement style cleanup

2016-09-17 Thread Jon Eyolfson
Changed if statement bodies from 2 levels deeper than if statement to 1.

Signed-off-by: Jon Eyolfson 
---
 drivers/staging/wlan-ng/cfg80211.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c 
b/drivers/staging/wlan-ng/cfg80211.c
index a36e40d..457f176 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -476,11 +476,11 @@ static int prism2_connect(struct wiphy *wiphy, struct 
net_device *dev,
 
/* Set the authorization */
if ((sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM) ||
-   ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && !is_wep))
-   msg_join.authtype.data = P80211ENUM_authalg_opensystem;
+   ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && !is_wep))
+   msg_join.authtype.data = P80211ENUM_authalg_opensystem;
else if ((sme->auth_type == NL80211_AUTHTYPE_SHARED_KEY) ||
-   ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep))
-   msg_join.authtype.data = P80211ENUM_authalg_sharedkey;
+((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep))
+   msg_join.authtype.data = P80211ENUM_authalg_sharedkey;
else
netdev_warn(dev,
"Unhandled authorisation type for connect (%d)\n",
-- 
2.9.3
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel