[PATCH] Staging: vc04_services: Fix a couple error codes

2019-05-13 Thread Dan Carpenter
These are accidentally returning positive EINVAL instead of negative -EINVAL. Some of the callers treat positive values as success. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan Carpenter --- drivers/staging/vc04_services/bcm2

Re: [PATCH v3 1/8] Staging: kpc2000: kpc_dma: Resolve trailing whitespace error reported by checkpatch

2019-05-13 Thread Dan Carpenter
2000/kpc_dma/kpc_dma_driver.c | 46 +++ > .../staging/kpc2000/kpc_dma/kpc_dma_driver.h | 16 +-- > 4 files changed, 131 insertions(+), 131 deletions(-) > regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driv

Re: [PATCH] drivers: staging :rtl8723bs :os_dep Remove Unneeded variable ret

2019-05-13 Thread Dan Carpenter
Please "drivers" out of the subject line. We know it's drivers, so that doesn't add any information. The "staging: " bit tells you which git tree this path is in, and the "rtl8723bs: " tells you which driver it is. regards, dan carpenter _

Re: [PATCH v3] drivers: staging : wlan-ng : collect return status without variable

2019-05-13 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [Patch v2] drivers: staging : wlan-ng : collect return status without variable

2019-05-11 Thread Dan Carpenter
, > + > DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, > + key_index); > } > I'm sorry, this patch can only be applied on top of v1, but we need a patch which can be applied on top of linux

Re: [PATCH] staging: wlan-ng: collect return status without variable

2019-05-10 Thread Dan Carpenter
On Fri, May 10, 2019 at 10:53:08PM +0530, Hariprasad Kelam wrote: > On Fri, May 10, 2019 at 01:57:54PM +0300, Dan Carpenter wrote: > > On Fri, May 10, 2019 at 08:09:00AM +0530, Hariprasad Kelam wrote: > > > diff --git a/drivers/staging/wlan-ng/cfg80211.c > > > b/drivers

Re: [PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-10 Thread Dan Carpenter
On Fri, May 10, 2019 at 09:13:26AM +, Ardelean, Alexandru wrote: > On Wed, 2019-05-08 at 16:26 +0300, Alexandru Ardelean wrote: > > On Wed, 2019-05-08 at 15:20 +0300, Dan Carpenter wrote: > > > > > > > > > On Wed, May 08, 2019 at 02:28:35PM +0300, Alexa

Re: [PATCH] staging: wlan-ng: collect return status without variable

2019-05-10 Thread Dan Carpenter
DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, key_index); regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] kpc_i2c: Remove unused file

2019-05-09 Thread Dan Carpenter
Outlook. You can't just use git send-email? Outlook is going to give you headaches forever. I use mutt, but one subsystem only accept patches from git send-email so I have to add a fake "X-Mailer: git-send-email" header to my patches... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3 4/4] staging: vchiq: stop explicitly comparing with zero to catch errors

2019-05-09 Thread Dan Carpenter
But since I was encouraging you to pick a style and use it consistently, then I'm always going to advocate my style... :P Anyway, thanks! Looks good to me. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] kpc_i2c: Remove unused file

2019-05-09 Thread Dan Carpenter
irst paragraph of Documentation/process/email-clients.rst regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-08 Thread Dan Carpenter
, > NR_PHY_TYPES There is no need for NR_PHY_TYPES now so you could remove that as well. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH net-next v2 0/4] of_get_mac_address ERR_PTR fixes

2019-05-07 Thread Dan Carpenter
Oh crap. You did add a Fixes tag. My bad. I should have been more clear/pro-active on Friday and we could have avoided this... Next time. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http

Re: [PATCH net-next v2 0/4] of_get_mac_address ERR_PTR fixes

2019-05-07 Thread Dan Carpenter
x27;m just very confused right now... What I'm trying to do is figure out in my head how this process failed so we can do better next time. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 2/3] staging: vchiq: revert "switch to wait_for_completion_killable"

2019-05-06 Thread Dan Carpenter
as it's mainly used as an interface to V4L2 and ALSA devices. Fixes: a772f116702e ("staging: vchiq: switch to wait_for_completion_killable") regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 2/3] staging: vchiq: revert "switch to wait_for_completion_killable"

2019-05-06 Thread Dan Carpenter
, I would prefer we just leave it out. I use != 0 for two things. 1) When I'm talking about the number zero. if (len == 0) { Or with strcmp(): if (strcmp(a, b) == 0) { // a equals b if (strcmp(a, b) < 0) { // a less than b. But here zero means no e

Re: [PATCH net-next 1/3] net: ethernet: support of_get_mac_address new ERR_PTR error

2019-05-06 Thread Dan Carpenter
ok at the commit which adds NVMEM support. It's not clear to me that anyone ever applied that patch. If not then who hoo! Let's not apply it. But if it has been committed then it has a git hash. regards, dan carpenter ___ de

Re: [PATCH v3 08/10] staging: octeon-ethernet: support of_get_mac_address new ERR_PTR error

2019-05-03 Thread Dan Carpenter
On Fri, May 03, 2019 at 09:07:30PM +0200, Petr Štetiar wrote: > Dan Carpenter [2019-05-03 13:34:56]: > > Hi, > > > On Fri, May 03, 2019 at 09:56:05AM +0200, Petr Štetiar wrote: > > > There was NVMEM support added to of_get_mac_address, so it could now > > > r

Re: [PATCH v3 08/10] staging: octeon-ethernet: support of_get_mac_address new ERR_PTR error

2019-05-03 Thread Dan Carpenter
't want to treat it as an error but we still can't return a pointer to a feature we don't have... It's hard for me to imagine how that makes sense for getting a mac address. At the very least, this patch needs a Fixes tag. regards, dan carpenter __

[PATCH] staging: kpc2000: fix resource size calculation

2019-04-30 Thread Dan Carpenter
tronics drivers") Signed-off-by: Dan Carpenter --- drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 2 +- drivers/staging/kpc2000/kpc_spi/spi_driver.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/k

[PATCH] staging: kpc2000: Fix a stack information leak in kp2000_cdev_ioctl()

2019-04-30 Thread Dan Carpenter
The kp2000_regs struct has a 4 byte hole between ->hw_rev and ->ssid so this could leak stack information to the user. This patch just memsets the whole struct to zero. Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers") Signed-off-by: Dan Carpent

Re: [PATCH RFC V2] staging: kpc2000: use int for wait_for_completion_interruptible

2019-04-30 Thread Dan Carpenter
+ */ > + if (ret) { > acd->cpl = NULL; > - } > - if (rv == 0){ > - rv = acd->len; > + } else { > + ret = acd->len; "acd->len"

Re: [PATCH] staging: greybus: use proper return type for wait_for_completion_timeout

2019-04-30 Thread Dan Carpenter
n < INT_MAX. Anyway, for sure the commit message should say that it's just a cleanup and not a bugfix. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH RFC] staging: kpc2000: use int for wait_for_completion_interruptible

2019-04-30 Thread Dan Carpenter
acd->cpl = NULL; > - } > - if (rv == 0){ > - rv = acd->len; > + } else { > + ret = acd->len; > kfree(acd); > } > - return rv; > + return ret I don't real

Re: [PATCH] staging: kpc2000: Use memset to initialize resources

2019-04-30 Thread Dan Carpenter
#YOLO #LivingOnTheEdge But in this case, it's already applied so everything worked out. :) regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: most: protect potential string overflow

2019-04-24 Thread Dan Carpenter
iface->p->dev_id = id; > - strcpy(iface->p->name, iface->description); > + strlcpy(iface->p->name, iface->description, sizeof(iface->p->name)); We prefer strscpy() more than strlcpy() these days. regards, dan carpenter _

Re: [PATCH] staging: ion: solve warning symbol was not declared

2019-04-24 Thread Dan Carpenter
te(phys_addr_t base, size_t size) > +static inline struct ion_heap *ion_carveout_heap_create(phys_addr_t base, > size_t size) Why are you making it inline? Btw, normally we just leave it for the compiler to choose which functions to make inline. regards, dan carpenter __

Re: [PATCH] staging: unisys: use help instead of ---help--- in Kconfig

2019-04-24 Thread Dan Carpenter
On Sat, Apr 20, 2019 at 11:46:46AM +, MosesChristopher wrote: > From: Moses Christopher > Could you Fix your email From header so this isn't required? regards, dan carpenter ___ devel mailing list de...@linuxdriverproje

Re: [PATCH] Staging: greybus: Cleanup in header file control.h

2019-04-15 Thread Dan Carpenter
On Mon, Apr 15, 2019 at 05:03:33PM +0200, Johan Hovold wrote: > But then all eight or so instances should be replaced in one go, to > maintain consistency. Yeah, that's fair enough, I suppose. regards, dan carepenter ___ devel mailing list de...@linuxdr

Re: [PATCH] Staging: greybus: Cleanup in header file control.h

2019-04-15 Thread Dan Carpenter
What I'm saying is that if we just apply it then we avoid the long discussion forever. The macro is OK, sure, but it's not like anyone is going to come back later and argue that macros are better or preferred. regards, dan carpenter ___ dev

Re: [PATCH] Staging: greybus: Cleanup in header file control.h

2019-04-15 Thread Dan Carpenter
tions *are* better than macros. It's a minor improvement, but this is staging and we make tons minor style changes. It's part of the blessing and curse of being in staging... regards, dan carpenter ___ devel mailing list de...@linuxdriverprojec

Re: [PATCH] staging: android: vsoc: fix copy_from_user overrun

2019-04-14 Thread Dan Carpenter
On Mon, Apr 15, 2019 at 09:32:44AM +0300, Dan Carpenter wrote: > On Sun, Apr 14, 2019 at 05:37:26PM +0200, Vincent Stehlé wrote: > > The `np->permission' structure is smaller than the `np' structure but > > sizeof(*np) worth of data is copied in there. Fix the size

Re: [PATCH] staging: android: vsoc: fix copy_from_user overrun

2019-04-14 Thread Dan Carpenter
|| The original code was probably correct... This is a common thing where people use "&p->first_struct_member" to represent the whole struct. It seems like kind of a horrible thing to do and I can't explain why people do it, but they do... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: erofs: fix unexpected out-of-bound data access

2019-04-12 Thread Dan Carpenter
s pointed out in the previous email [1]. > > [1] https://lore.kernel.org/lkml/20190411080953.GE421@ming.t460p/ > Please also use the Fixes tag. Fixes: 07173c3ec276 ("block: enable multipage bvecs") > Suggested-by: Ming Lei > Reviewed-by:

Re: [PATCH] Staging: rtl8723bs: Remove typedef in struct sdio_data

2019-04-11 Thread Dan Carpenter
On Wed, Apr 10, 2019 at 02:49:09PM -0500, Madhumthia Prabakaran wrote: > On Wed, Apr 10, 2019 at 09:49:54AM +0300, Dan Carpenter wrote: > > On Tue, Apr 09, 2019 at 11:16:17AM -0500, Madhumitha Prabakaran wrote: > > > diff --git a/drivers/staging/rtl8723bs/include/drv_types.

Re: [PATCH] Staging: rtl8723bs: Remove typedef in struct sdio_data

2019-04-11 Thread Dan Carpenter
On Wed, Apr 10, 2019 at 02:49:09PM -0500, Madhumthia Prabakaran wrote: > On Wed, Apr 10, 2019 at 09:49:54AM +0300, Dan Carpenter wrote: > > On Tue, Apr 09, 2019 at 11:16:17AM -0500, Madhumitha Prabakaran wrote: > > > diff --git a/drivers/staging/rtl8723bs/include/drv_types.

Re: [PATCH] staging: fbtft: fix alignment should match open parenthesis

2019-04-10 Thread Dan Carpenter
l code was written that way deliberately. I don't know why it's broken up like that but it probably means something to people who have read the hardware spec. I would leave it as-is. regards, dan carpenter ___ devel mailing list de...@linux

Re: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-04-09 Thread Dan Carpenter
ize, int groupsize, > if (j) > lx--; > } > - if (!ascii) > + if (!flags & HEXDUMP_ASCII) ^^ This is a precedence bug. It should be if (!(flags & HEXDUMP_ASCII)). > goto nil; > regards, dan car

Re: [PATCH] Staging: rtl8723bs: Remove typedef in struct sdio_data

2019-04-09 Thread Dan Carpenter
INTF_DATA data as well. It's only used once a bit lower in the file. (Get rid of the ifdef around it). regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: media: zoran: fix trailing whitespaces

2019-04-07 Thread Dan Carpenter
nsecutive blank lines so really we should just delete the lines entirely... But this driver is scheduled for deletion in May. Let's not bother with cleaning it up. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] Staging: greybus: Fix spinlock_t definition without comment

2019-04-05 Thread Dan Carpenter
't we just use the spinlock for everything? I did glance at the code and it wasn't immediately obvious to me. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/3] Revert "staging: vchiq_2835_arm: quit using custom down_interruptible()"

2019-04-05 Thread Dan Carpenter
. See commit 75ae193626de ("dm: revert 8f50e358153d ("dm: limit the max bio size as BIO_MAX_PAGES * PAGE_SIZE")") for an example of how to do it nicely. regards, dan carpenter ___ devel mailing list de...@l

Re: [PATCH] staging: rtl8192u: ieee80211: add space around '==' and before '('

2019-04-04 Thread Dan Carpenter
many code style issues, see > > ./scripts/checkpatch.pl --no-tree -f > drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c > Yes. Of course it has millions of style issues. It's staging code. Leave it. We'll fix it little by little. That said, I kind of would prefer to

Re: [PATCH v3] Staging: rtlwifi: Cleanup crc16_ccitt()

2019-04-04 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: rtl8723bs: hal: replace spaces by tabs.

2019-04-04 Thread Dan Carpenter
On Thu, Apr 04, 2019 at 10:09:30AM -0300, Beatriz Martins de Carvalho wrote: > Fix checkpatch error "ERROR: code indent should use tabs where possible" > in hal_com_phycfg.c:1726. > > Signed-off-by: Beatriz Martins de Carvalho > > --- Looks good. Thanks! Reviewed

Re: [PATCH] staging: rtl8192u: remove redundant null check on array 'data'

2019-04-04 Thread Dan Carpenter
;u.wpa_ie.len && param->u.wpa_ie.data == NULL)) > + if (param->u.wpa_ie.len > MAX_WPA_IE_LEN || param->u.wpa_ie.len) > return -EINVAL; Nope... :P Don't do that... regards, dan carpenter ___ devel maili

Re: [PATCH] staging: iio: cdc: ad7746: Replace bitshift by BIT

2019-04-04 Thread Dan Carpenter
it's part of a set. Just ignore checkpatch when it gives nonsense advice. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] Staging: rtlwifi: Remove unwanted parentheses

2019-04-04 Thread Dan Carpenter
BIT(11)) ^ shift_in; > if (crc_bit11 == 0) > result &= (~BIT(12)); ^^ I thought your Coccinelle script was going to complain about these parentheses. Probably the &= confuses it? There are a couple other

Re: [PATCH] Staging: rtlwifi: Remove unwanted parentheses

2019-04-03 Thread Dan Carpenter
On Wed, Apr 03, 2019 at 07:18:03PM +0300, Dan Carpenter wrote: > data_bit = (data & BIT(i)) ? 1 : 0; I quite like the !! idiom also... data_bit = !!(data & BIT(i)); regards, dan carpenter ___ devel mail

Re: [PATCH] Staging: rtlwifi: Remove unwanted parentheses

2019-04-03 Thread Dan Carpenter
t shifting BIT() is silly. But I like the extra parentheses around the bitwise AND operation because that's a hard precedence to remember. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] Staging: greybus: usb: Fixed a coding style error

2019-04-01 Thread Dan Carpenter
tion = gb_connection_create(gbphy_dev->bundle, tmp, NULL); "tmp" is the wrong name... :/ Like Joe said, it's doesn't help readability to introduce one time use temporary variables just to make the line lengths shorter. This line is 81 characters. It's fine. Just leave

Re: [PATCH v2 04/14] staging: most: sound: introduce new sound adapter management

2019-03-29 Thread Dan Carpenter
et my fuzz tester to start randomly connecting and disconnecting like crazy? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: android: ion: refactory ion_alloc for kernel driver use

2019-03-29 Thread Dan Carpenter
If we're going to export ion_alloc() for other drivers to use then let's make an ion_free() helper function as well. void ion_free(struct dma_buf *dmabuf) { dma_buf_put(dmabuf); } regards, dan carpenter ___ devel maili

Re: [PATCH v2 04/14] staging: most: sound: introduce new sound adapter management

2019-03-29 Thread Dan Carpenter
ed = true; > + return ret; ^^ return 0; > +} This function is just strange to me... We add a bunch of adapters to "adpt_list" in audio_probe_channel(). Each adapter has it's own adpt->card. But here we ju

Re: [PATCH v2 10/14] staging: most: allow speculative configuration

2019-03-29 Thread Dan Carpenter
configuration as is and complete stuff > once a device is being attached. >   Yeah... But future programmers will just add whatever error codes occur to them at the time. Now we have two error codes which are special instead of one (twice as much chance for them to mess

Re: [PATCH] staging: rtl8192u: fix incorrect mask for EEPROMTxPowerLevelCCK setting

2019-03-29 Thread Dan Carpenter
happens in the current code is that we set EEPROMTxPowerLevelCCK to zero. Then we subtract: priv->TxPowerLevelCCK[i] = priv->EEPROMTxPowerLevelOFDM24G[0] + (priv->EEPROMTxPowerLevelCCK - priv->EEPROMTxPowerLevelOFDM24G[1]); Possibly leading to a high u8 value, then in phy_

Re: [PATCH 3/3] staging: mt7621-pci-phy: change driver to don't use child nodes

2019-03-29 Thread Dan Carpenter
. To be honest, I don't know anything about device tree. Does "phy_num" come from the device tree stuff that you just changed in the ealier patches? (I never read those so I never learn anything about device tree so I am stuck in an endless doom cycle). Anyway, I am a real newbie. Wh

Re: [RFC PATCH 22/68] vfs: Convert binderfs to use the new mount API

2019-03-28 Thread Dan Carpenter
On Wed, Mar 27, 2019 at 11:43:20PM +, David Howells wrote: > +static void binderfs_free_fc(struct fs_context *fc) > +{ > + struct binderfs_info *info = fc->s_fs_info; > + > + if (info) { > + struct ipc_namespace *ipc_ns = fc->s_fs_info; > + put_ipc_ns(ipc_ns); I

Re: [PATCH v2 10/14] staging: most: allow speculative configuration

2019-03-28 Thread Dan Carpenter
> char *sample_res; > + char arg_list_cpy[STRING_SIZE]; > > if (!iface) > return -EINVAL; > @@ -590,8 +592,8 @@ static int audio_probe_channel(struct most_interface > *iface, int channel_id, > pr_err("Incompatible channel type\n"); > return -EINVAL; > } > - > - ret = split_arg_list(arg_list, &ch_num, &sample_res); > + strlcpy(arg_list_cpy, arg_list, STRING_SIZE); > + ret = split_arg_list(arg_list_cpy, &ch_num, &sample_res); I don't understand why we need a copy of arg_list or how this relates to the rest of the patch. > if (ret < 0) > return ret; > regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 04/14] staging: most: sound: introduce new sound adapter management

2019-03-28 Thread Dan Carpenter
nction so why are we releasing it here. Do we release it somewhere else as well? It's still on the list... > + return ret; > + } > + adpt->registered = true; > + return ret; > +} regards, dan carpenter _

Re: [PATCH v2 03/14] staging: most: core: add configfs interface functions

2019-03-28 Thread Dan Carpenter
> + } else if (!strcmp(buf, "tx\n")) { > + c->cfg.direction = MOST_CH_TX; > + } else { > + pr_info("Invalid direction\n"); > + return -ENODATA; > + } Please use sysfs_streq(). > + return 0; > +} r

Re: [PATCH v2 01/14] staging: most: add new file configfs.c

2019-03-28 Thread Dan Carpenter
l. The strcmp() functions less intuitive and they should be used like this: if (strcmp(foo, bar) < 0) { // <-- foo < bar if (strcmp(foo, bar) != 0) { // <-- foo != bar if (strcmp(foo, bar) == 0) { // <-- foo == bar The other streq() tests have the same issue.

Re: [PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning

2019-03-27 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: pi433: Fix rf69_set_tx_cfg() logic

2019-03-27 Thread Dan Carpenter
(ret < 0) > + return ret; > + ret = rf69_set_sync_values(dev->spi, tx_cfg->sync_pattern); > + if (ret < 0) > + return ret; It's weird that we enable sync before we et the size or sync values... re

Re: [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning

2019-03-26 Thread Dan Carpenter
stency. It's not aligned properly and there are too many parenthesis. This patch just cleans up a condition, it doesn't affect runtime. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: your mail

2019-03-26 Thread Dan Carpenter
or > > Removed unnecessary parentheses. > > Signed-off-by: Will Cunningham Please fix up the headers and resend. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: vc04_services: Fix an error code in vchiq_probe()

2019-03-25 Thread Dan Carpenter
We need to set "err" on this error path. Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions") Signed-off-by: Dan Carpenter --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

Re: [PATCH 01/14] staging: most: add new file configfs.c

2019-03-22 Thread Dan Carpenter
ar *buf = (char *)page; > + > + if (strcmp(buf, "dir_rx\n") && strcmp(buf, "rx\n") && > + strcmp(buf, "dir_tx\n") && strcmp(buf, "tx\n")) Please use sysfs_streq() here instead of strcmp(). It'

Re: [PATCH 01/14] staging: most: add new file configfs.c

2019-03-22 Thread Dan Carpenter
;most->list, &ms->soundcard_list); > + return &most->group; > +} > + > +static struct configfs_group_operations most_sound_group_ops = { > + .make_group = most_sound_make_group, > +}; > + > +static const struct config_item_type most_sound_type = {

Re: Help on testing ad5933 driver

2019-03-22 Thread Dan Carpenter
ldn't be bricking hardware... Hardware used to be easier to brick in olden times... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: ralink-gdma: Change uint32_t to u32

2019-03-22 Thread Dan Carpenter
d type u32. This fixed the checkpatch.pl > warning: "Prefer u32 over uint32_t". This line is too long. Limit it to 72 characters. > > Signed-off-by: Bharath Vedartham > --- ^^^ regards, dan carpenter ___ devel mailing list

Re: [PATCH v2] staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc

2019-03-21 Thread Dan Carpenter
with the commit message. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: rtl8712: uninitialized memory in read_bbreg_hdl()

2019-03-20 Thread Dan Carpenter
On Thu, Mar 21, 2019 at 09:26:38AM +0300, Dan Carpenter wrote: > Colin King reported a bug in read_bbreg_hdl(): > > memcpy(pcmd->rsp, (u8 *)&val, pcmd->rspsz); > > The problem is that "val" is uninitialized. > > This code is obviously not useful,

[PATCH] staging: rtl8712: uninitialized memory in read_bbreg_hdl()

2019-03-20 Thread Dan Carpenter
x27;s not harmful either. For now the easiest fix is to just call r8712_free_cmd_obj() and return. Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel") Reported-by: Colin Ian King Signed-off-by: Dan Carpenter --- drivers/staging/rtl8712/rtl871

Re: [RESEND][PATCH 2/2] staging: sm750fb: trivial Camel Case removal for setDisplayControl().

2019-03-20 Thread Dan Carpenter
o why does it have a Suggested-by tag for him? If not then you should have preserved the authorship credit by using the From: header in the first line on the commit message... Anyway, it doesn't matter but hopefully this helps for next time. regards, dan carpenter ___

Re: [PATCH] staging: rtlwifi: Fix potential NULL pointer dereference

2019-03-20 Thread Dan Carpenter
ine between the allocation and the check. They're part of the same code and it's weird to double space the code. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: static analysis bug report: staging r8712u memcpy of uninitialized variable

2019-03-20 Thread Dan Carpenter
_cmdrsp_callback() which frees pcmd->parmbuf and pcmd but leaks pcmd->rsp. I don't see a way for anyone to access the ->rsp memory so probably there aren't any security implications. Anyway, let me send a patch. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 3/3] staging: iio: ad7780: Add parentheses to macros

2019-03-20 Thread Dan Carpenter
rdsize - bits) > + AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, (bits), 32, ((wordsize) - (bits))) ^^ These parentheses are not required. This doesn't fix the "argument reuse" issue... It's not a reall issue though, and it isn't like this a core macro so it

Re: [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros

2019-03-20 Thread Dan Carpenter
> AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) * > AD7280A_CELLS_PER_DEV) + \ + (c) - AD7280A_CELLS_PER_DEV) > > #define AD7280A_DEVADDR_MASTER 0 define > #AD7280A_DEVADDR_ALL 0x1F I don't know how this diff got added to the commit message, but obviously we don't want tha

Re: [PATCH] staging: emxx_udc: fix various indentation issues

2019-03-20 Thread Dan Carpenter
On Sun, Mar 17, 2019 at 04:14:11PM +0100, Emiliano Ingrassia wrote: > This patch fixes various indentation and coding style issues in > EMXX UDC device controller driver. > Only fix one thing at a time, not "various". No signed-off-by line. reg

Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c

2019-03-14 Thread Dan Carpenter
/ 2))) > > > > Yeah. Lindent is correct here. > > Funny enough, this is something I adjusted manually :) > :) Good. > I have a process question here: to post a change for the only accepted change > I > have in this patch should I send out a new pat

Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c

2019-03-13 Thread Dan Carpenter
{ > .driver = { > - .name = DRIVER_NAME, > - .of_match_table = mt7621_spi_match, > - }, > +.name = DRIVER_NAME, > +.of_match_table = mt7621_spi_match, > +}, The new indenting is very wrong. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/2] Staging: rtl8723bs: os_dep: Fix several coding style errors

2019-03-12 Thread Dan Carpenter
> - replace spaces with tabs to indent, > - add blank line after declarations, > - fix braces and 'else' poistions in selection statements. > I'm sorry you're going to have to break this up into multiple patches. Probably one f

Re: [PATCH] staging: davinci: drop pointless static qualifier in vpfe_resizer_init()

2019-03-11 Thread Dan Carpenter
On Mon, Mar 11, 2019 at 02:10:12PM +, Colin Ian King wrote: > On 11/03/2019 14:07, Dan Carpenter wrote: > > On Mon, Mar 11, 2019 at 10:14:05PM +0800, Mao Wenan wrote: > >> There is no need to have the 'T *v' variable static > >> since new v

Re: [PATCH v2] staging: davinci: drop pointless static qualifier in vpfe_resizer_init()

2019-03-11 Thread Dan Carpenter
Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: davinci: drop pointless static qualifier in vpfe_resizer_init()

2019-03-11 Thread Dan Carpenter
t; struct media_entity *me = &sd->entity; > - static resource_size_t res_len; > + resource_size_t res_len; ^ Could you remove the extra space character also, please. > struct resource *res; > int ret; regards, dan carpenter ___

Re: [PATCH] Staging: rtl8712: Fix comment position, it goes after statment

2019-03-11 Thread Dan Carpenter
u32 command; > u32 status; > u8 *pbuf; regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: iio: adc: ad7192: Add spaces around minus operator

2019-03-11 Thread Dan Carpenter
did a simple grep of my inbox and it says that this is the 13th time someone has tried to do this. It's possible that my grep is wrong, 13 seems high but not totaly impossible. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] FBTFT: fbtft-bus: Fix code style problems

2019-03-11 Thread Dan Carpenter
I feel like you need to break the patch up a bit and do the white space fixes separate from the other changes. (Probably you're going to have to redo this several times because it's hard to review when it's so mixed up with multiple changes at the same time). regards

Re: [PATCH] FBTFT: fbtft-bus: Fix code style problems

2019-03-11 Thread Dan Carpenter
7;s not really clear what you're trying to do actually... You need to sell your patch a bit to try convince us that it's worth applying. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriv

Re: [PATCH] staging/board/board.c: Fix compiler error of_find_all_nodes()

2019-03-05 Thread Dan Carpenter
gt; static struct device_node *irqc_node __initdata; > static unsigned int irqc_base __initdata; > > +extern struct device_node *of_find_all_nodes(struct device_node *prev); > + We already include so what's going on here? The driver compiles for

Re: [PATCH] staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest

2019-03-05 Thread Dan Carpenter
On Tue, Mar 05, 2019 at 11:32:18AM +, Ian Abbott wrote: > On 05/03/2019 11:10, Dan Carpenter wrote: > > On Mon, Mar 04, 2019 at 02:33:54PM +, Ian Abbott wrote: > > > The problem was reported on the COMEDI mailing list here: > > > https://groups.google.co

Re: [PATCH] staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest

2019-03-05 Thread Dan Carpenter
ed-by tag? It's a public mailing list so that shouldn't be a problem. > Fixes: f164cbf98fa8 ("staging: comedi: ni_mio_common: add finite regeneration > to dio output") > Cc: # 4.6+ > Cc: Spencer E. Olson > Signed-off-by: Ian Abbott > --- regards, dan carpen

Re: [bug report] habanalabs: add virtual memory and MMU modules

2019-03-05 Thread Dan Carpenter
On Tue, Mar 05, 2019 at 08:34:50AM +, Omer Shpigelman wrote: > From: Dan Carpenter > Sent: Tuesday, 5 March 2019 8:40 > > Hello Omer Shpigelman, > > > > The patch 0feaf86d4e69: "habanalabs: add virtual memory and MMU > > modules" from Feb 16, 201

[bug report] habanalabs: add virtual memory and MMU modules

2019-03-04 Thread Dan Carpenter
_pack->contiguous) { 103 for (i = 0 ; i < num_pgs ; i++) 104 phys_pg_pack->pages[i] = paddr + i * page_size; 105 } else { regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4 1/9] staging: iio: ad7780: add gain & filter gpio support

2019-02-28 Thread Dan Carpenter
1, 128 }; > > +static const unsigned int ad778x_odr_avail[2] = { 1, 16700 }; > > ad778x_odr_avail[2] is not used in this patch, so it should probably go > into the next one > (i.e. staging: iio: ad7780: add filter reading to ad778x ) > > one good way of catching s

Re: [PATCH] staging/ks7070: Removed unused varibale

2019-02-22 Thread Dan Carpenter
Cc: Sergio Paracuellos > Cc: Quytelda Kahja > > Signed-off-by: Bo Yu > --- ^^^ > drivers/staging/ks7010/ks_hostif.c | 6 -- > 1 file changed, 6 deletions(-) > regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 -next] staging: rtl8192e: Remove set but not used variables 'broad_addr, stype'

2019-02-18 Thread Dan Carpenter
Fantastic! Thanks. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH -next] staging: rtl8192e: Remove set but not used variables 'broad_addr, stype'

2019-02-18 Thread Dan Carpenter
On Mon, Feb 18, 2019 at 12:33:59PM +, YueHaibing wrote: > @@ -1747,11 +1747,10 @@ static short _rtl92e_tx(struct net_device *dev, > struct sk_buff *skb) > header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size); > fc = le16_to_cpu(header->frame_ctl); > type = WL

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Dan Carpenter
On Mon, Feb 18, 2019 at 10:41:36AM +0800, Chao Yu wrote: > On 2019/2/15 17:35, Dan Carpenter wrote: > > On Fri, Feb 15, 2019 at 05:32:33PM +0800, Chao Yu wrote: > >> On 2019/2/15 15:57, Dan Carpenter wrote: > >>> On Fri, Feb 15, 2019 at 03:02:25PM +0800, Chao Yu w

<    4   5   6   7   8   9   10   11   12   13   >