[PATCH] staging: ks7010: enclosed complex macro definitions with parentheses
kshostif.h fixed ERROR: Macros with complex values should be enclosed in paranthesis Signed-off-by: Pritthijit Nath --- drivers/staging/ks7010/ks_hostif.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 39138191a556..c62a494ed6bb 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -498,20 +498,20 @@ struct hostif_mic_failure_request { #define TX_RATE_FIXED 5 /* 11b rate */ -#define TX_RATE_1M (u8)(10 / 5)/* 11b 11g basic rate */ -#define TX_RATE_2M (u8)(20 / 5)/* 11b 11g basic rate */ -#define TX_RATE_5M (u8)(55 / 5)/* 11g basic rate */ -#define TX_RATE_11M(u8)(110 / 5) /* 11g basic rate */ +#define TX_RATE_1M ((u8)(10 / 5)) /* 11b 11g basic rate */ +#define TX_RATE_2M ((u8)(20 / 5)) /* 11b 11g basic rate */ +#define TX_RATE_5M ((u8)(55 / 5)) /* 11g basic rate */ +#define TX_RATE_11M((u8)(110 / 5)) /* 11g basic rate */ /* 11g rate */ -#define TX_RATE_6M (u8)(60 / 5)/* 11g basic rate */ -#define TX_RATE_12M(u8)(120 / 5) /* 11g basic rate */ -#define TX_RATE_24M(u8)(240 / 5) /* 11g basic rate */ -#define TX_RATE_9M (u8)(90 / 5) -#define TX_RATE_18M(u8)(180 / 5) -#define TX_RATE_36M(u8)(360 / 5) -#define TX_RATE_48M(u8)(480 / 5) -#define TX_RATE_54M(u8)(540 / 5) +#define TX_RATE_6M ((u8)(60 / 5)) /* 11g basic rate */ +#define TX_RATE_12M((u8)(120 / 5)) /* 11g basic rate */ +#define TX_RATE_24M((u8)(240 / 5)) /* 11g basic rate */ +#define TX_RATE_9M ((u8)(90 / 5)) +#define TX_RATE_18M((u8)(180 / 5)) +#define TX_RATE_36M((u8)(360 / 5)) +#define TX_RATE_48M((u8)(480 / 5)) +#define TX_RATE_54M((u8)(540 / 5)) static inline bool is_11b_rate(u8 rate) { -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: Fixed alignment with issue in rf.c
This change fixes a checkpatch CHECK style issue for "Alignment should match open parenthesis". Signed-off-by: Pritthijit Nath --- drivers/staging/vt6656/rf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 5b8da06e3916..bcd4d467e03a 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { ret = vnt_rf_write_embedded(priv, - vt3226d0_lo_current_table[hw_value]); + vt3226d0_lo_current_table[hw_value]); if (ret) return ret; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vt6656: Fixed alignment with issue in rf.c
On 11/02/21 7:15 pm, Pritthijit Nath wrote: > This change fixes a checkpatch CHECK style issue for "Alignment should match > open parenthesis". > > Signed-off-by: Pritthijit Nath > --- > drivers/staging/vt6656/rf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c > index 5b8da06e3916..bcd4d467e03a 100644 > --- a/drivers/staging/vt6656/rf.c > +++ b/drivers/staging/vt6656/rf.c > @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, > u8 power, > > if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { > ret = vnt_rf_write_embedded(priv, > - vt3226d0_lo_current_table[hw_value]); > + > vt3226d0_lo_current_table[hw_value]); > if (ret) > return ret; > } > I am resubmitting this patch. Pardon the typo in the subject line. thanks, Pritthijit ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: Fixed issue with alignment in rf.c
This change fixes a checkpatch CHECK style issue for "Alignment should match open parenthesis". Signed-off-by: Pritthijit Nath --- drivers/staging/vt6656/rf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 5b8da06e3916..bcd4d467e03a 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { ret = vnt_rf_write_embedded(priv, - vt3226d0_lo_current_table[hw_value]); + vt3226d0_lo_current_table[hw_value]); if (ret) return ret; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: greybus: Fixed misspelling and alignment issue in hid.c
This change fixes a checkpatch CHECK style issue for "Alignment should match open parenthesis". In addition the misspelling of "transferred" also has been fixed. Signed-off-by: Pritthijit Nath --- drivers/staging/greybus/hid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index ed706f39e87a..adb91286803a 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -221,8 +221,8 @@ static void gb_hid_init_reports(struct gb_hid *ghid) } static int __gb_hid_get_raw_report(struct hid_device *hid, - unsigned char report_number, __u8 *buf, size_t count, - unsigned char report_type) + unsigned char report_number, __u8 *buf, size_t count, + unsigned char report_type) { struct gb_hid *ghid = hid->driver_data; int ret; @@ -254,7 +254,7 @@ static int __gb_hid_output_raw_report(struct hid_device *hid, __u8 *buf, ret = gb_hid_set_report(ghid, report_type, report_id, buf, len); if (report_id && ret >= 0) - ret++; /* add report_id to the number of transfered bytes */ + ret++; /* add report_id to the number of transferred bytes */ return 0; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vt6656: Fixed issue with alignment in rf.c
On 12/02/21 1:59 am, Greg KH wrote: > On Thu, Feb 11, 2021 at 08:54:26PM +0530, Pritthijit Nath wrote: >> This change fixes a checkpatch CHECK style issue for "Alignment should match >> open parenthesis". >> >> Signed-off-by: Pritthijit Nath >> --- >> drivers/staging/vt6656/rf.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c >> index 5b8da06e3916..bcd4d467e03a 100644 >> --- a/drivers/staging/vt6656/rf.c >> +++ b/drivers/staging/vt6656/rf.c >> @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, >> u8 power, >> >> if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { >> ret = vnt_rf_write_embedded(priv, >> -vt3226d0_lo_current_table[hw_value]); >> + >> vt3226d0_lo_current_table[hw_value]); >> if (ret) >> return ret; >> } >> -- >> 2.25.1 > > Please run this change, with the changelog above, through > checkpatch.pl, fix that, and resend. > > thanks, > > greg k-h > This change fixes a checkpatch CHECK style issue for "Alignment should match open parenthesis". Signed-off-by: Pritthijit Nath --- drivers/staging/vt6656/rf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 5b8da06e3916..bcd4d467e03a 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { ret = vnt_rf_write_embedded(priv, - vt3226d0_lo_current_table[hw_value]); + vt3226d0_lo_current_table[hw_value]); if (ret) return ret; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vt6656: Fixed issue with alignment in rf.c
On 12/02/21 2:14 am, Greg KH wrote: > On Fri, Feb 12, 2021 at 02:07:50AM +0530, Pritthijit Nath wrote: >> On 12/02/21 1:59 am, Greg KH wrote: >>> On Thu, Feb 11, 2021 at 08:54:26PM +0530, Pritthijit Nath wrote: >>>> This change fixes a checkpatch CHECK style issue for "Alignment should >>>> match open parenthesis". >>>> >>>> Signed-off-by: Pritthijit Nath >>>> --- >>>> drivers/staging/vt6656/rf.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c >>>> index 5b8da06e3916..bcd4d467e03a 100644 >>>> --- a/drivers/staging/vt6656/rf.c >>>> +++ b/drivers/staging/vt6656/rf.c >>>> @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private >>>> *priv, u8 power, >>>> >>>>if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { >>>>ret = vnt_rf_write_embedded(priv, >>>> - vt3226d0_lo_current_table[hw_value]); >>>> + >>>> vt3226d0_lo_current_table[hw_value]); >>>>if (ret) >>>>return ret; >>>> } >>>> -- >>>> 2.25.1 >>> >>> Please run this change, with the changelog above, through >>> checkpatch.pl, fix that, and resend. >>> >>> thanks, >>> >>> greg k-h >>> >> >> This change fixes a checkpatch CHECK style issue for "Alignment should >> match open parenthesis". >> >> Signed-off-by: Pritthijit Nath >> --- >> drivers/staging/vt6656/rf.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c >> index 5b8da06e3916..bcd4d467e03a 100644 >> --- a/drivers/staging/vt6656/rf.c >> +++ b/drivers/staging/vt6656/rf.c >> @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, >> u8 power, >> >> if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { >> ret = vnt_rf_write_embedded(priv, >> -vt3226d0_lo_current_table[hw_value]); >> + >> vt3226d0_lo_current_table[hw_value]); >> if (ret) >> return ret; >> } > > I can't take this type of submission, do you see other patches submitted > this way on the mailing list? Actually I am having a hard time since this one's my first. I would really appreciate if you could be a little clear. Should I resend the entire patch as a new thread? > > Also, you have a trailing space in your changelog text :( Thanks for pointing out. Yes, I have fixed the trailing space. > > thanks, > > greg k-h > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: Fixed issue with alignment in rf.c
This change fixes a checkpatch CHECK style issue for "Alignment should match open parenthesis". Signed-off-by: Pritthijit Nath --- drivers/staging/vt6656/rf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 5b8da06e3916..bcd4d467e03a 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { ret = vnt_rf_write_embedded(priv, - vt3226d0_lo_current_table[hw_value]); + vt3226d0_lo_current_table[hw_value]); if (ret) return ret; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: Fixed issue with alignment in rf.c
This change fixes a checkpatch CHECK style issue for "Alignment should match open parenthesis". Signed-off-by: Pritthijit Nath --- Fixed trailing space in changelog. drivers/staging/vt6656/rf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 5b8da06e3916..bcd4d467e03a 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -687,7 +687,7 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table)) { ret = vnt_rf_write_embedded(priv, - vt3226d0_lo_current_table[hw_value]); + vt3226d0_lo_current_table[hw_value]); if (ret) return ret; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: greybus: Fixed alignment issue in hid.c
This change fixes a checkpatch CHECK style issue for "Alignment should match open parenthesis". Signed-off-by: Pritthijit Nath --- drivers/staging/greybus/hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index ed706f39e87a..a56c3fb5d35a 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -221,8 +221,8 @@ static void gb_hid_init_reports(struct gb_hid *ghid) } static int __gb_hid_get_raw_report(struct hid_device *hid, - unsigned char report_number, __u8 *buf, size_t count, - unsigned char report_type) + unsigned char report_number, __u8 *buf, size_t count, + unsigned char report_type) { struct gb_hid *ghid = hid->driver_data; int ret; -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: greybus: Fixed a misspelling in hid.c
Fixed the spelling of 'transfered' to 'transferred'. Signed-off-by: Pritthijit Nath --- drivers/staging/greybus/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index a56c3fb5d35a..6b19ff4743a9 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -254,7 +254,7 @@ static int __gb_hid_output_raw_report(struct hid_device *hid, __u8 *buf, ret = gb_hid_set_report(ghid, report_type, report_id, buf, len); if (report_id && ret >= 0) - ret++; /* add report_id to the number of transfered bytes */ + ret++; /* add report_id to the number of transferrid bytes */ return 0; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: greybus: Fixed a misspelling in hid.c
Fixed the spelling of 'transfered' to 'transferred'. Signed-off-by: Pritthijit Nath --- Fixed the typo in the patch which was meant to fix that very typo. Really sorry for last time. Hope this does not have any other typo. drivers/staging/greybus/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index a56c3fb5d35a..adb91286803a 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -254,7 +254,7 @@ static int __gb_hid_output_raw_report(struct hid_device *hid, __u8 *buf, ret = gb_hid_set_report(ghid, report_type, report_id, buf, len); if (report_id && ret >= 0) - ret++; /* add report_id to the number of transfered bytes */ + ret++; /* add report_id to the number of transferred bytes */ return 0; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: greybus: Fixed a misspelling in hid.c
Fixed the spelling of 'transfered' to 'transferred'. Signed-off-by: Pritthijit Nath --- Fixed the typo in 'transferred' which crept in last time. drivers/staging/greybus/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index a56c3fb5d35a..adb91286803a 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -254,7 +254,7 @@ static int __gb_hid_output_raw_report(struct hid_device *hid, __u8 *buf, ret = gb_hid_set_report(ghid, report_type, report_id, buf, len); if (report_id && ret >= 0) - ret++; /* add report_id to the number of transfered bytes */ + ret++; /* add report_id to the number of transferred bytes */ return 0; } -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wlan-ng: Fixed incorrect type warning in p80211netdev.c
This change fixes a sparse warning "incorrect type in argument 1 (different address spaces)". Signed-off-by: Pritthijit Nath --- drivers/staging/wlan-ng/p80211netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 6f9666dc0277..70570e8a5ad2 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -569,7 +569,7 @@ static int p80211knetdev_do_ioctl(struct net_device *dev, goto bail; } - msgbuf = memdup_user(req->data, req->len); + msgbuf = memdup_user((void __user *)req->data, req->len); if (IS_ERR(msgbuf)) { result = PTR_ERR(msgbuf); goto bail; -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wlan-ng: Fixed incorrect type warning in p80211netdev.c
On 17/02/21 9:23 pm, Greg KH wrote: > On Wed, Feb 17, 2021 at 09:12:55PM +0530, Pritthijit Nath wrote: >> This change fixes a sparse warning "incorrect type in argument 1 >> (different address spaces)". >> >> Signed-off-by: Pritthijit Nath >> --- >> drivers/staging/wlan-ng/p80211netdev.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/wlan-ng/p80211netdev.c >> b/drivers/staging/wlan-ng/p80211netdev.c >> index 6f9666dc0277..70570e8a5ad2 100644 >> --- a/drivers/staging/wlan-ng/p80211netdev.c >> +++ b/drivers/staging/wlan-ng/p80211netdev.c >> @@ -569,7 +569,7 @@ static int p80211knetdev_do_ioctl(struct net_device *dev, >> goto bail; >> } >> >> -msgbuf = memdup_user(req->data, req->len); >> +msgbuf = memdup_user((void __user *)req->data, req->len); > > Odd. Why isn't data tagged as a __user pointer to start with? > > thanks, > > greg k-h > In lines 540-548 -> ... static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { int result = 0; struct p80211ioctl_req *req = (struct p80211ioctl_req *)ifr; struct wlandevice *wlandev = dev->ml_priv; u8 *msgbuf; netdev_dbg(dev, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len); ... it can be seen that *req is essentially coming from an explicit cast of *ifr. ifr->data itself is of char* type. So, imo, an explicit __user pointer cast is required. The patch above was based on the __user pointer cast done in lines 580-586 -> ... if (result == 0) { if (copy_to_user ((void __user *)req->data, msgbuf, req->len)) { result = -EFAULT; } } kfree(msgbuf); ... and lines 550-556 -> #ifdef SIOCETHTOOL if (cmd == SIOCETHTOOL) { result = p80211netdev_ethtool(wlandev, (void __user *)ifr->ifr_data); goto bail; } #endif ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vc04_services: Fixed address type mismatch in vchiq_arm.c
This change fixes a sparse address type mismatch warning "incorrect type in assignment (different address spaces)". Signed-off-by: Pritthijit Nath --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 59e45dc03a97..3c715b926a57 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1214,11 +1214,7 @@ static int vchiq_ioc_await_completion(struct vchiq_instance *instance, !instance->use_close_delivered) unlock_service(service); - /* -* FIXME: address space mismatch, does bulk_userdata -* actually point to user or kernel memory? -*/ - user_completion.bulk_userdata = completion->bulk_userdata; + user_completion.bulk_userdata = (void __user *)completion->bulk_userdata; if (vchiq_put_completion(args->buf, &user_completion, ret)) { if (ret == 0) -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel