Re: [PATCH] staging: android: ion: Skip sync if not mapped

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

Re: [PATCH 12/20] staging: wfx: align semantic of beacon filter with other filters

2020-04-16 Thread Dan Carpenter
negation: "disable filter" Hooray! I have been wanting to suggest this every time I see the ->disable_beacon_filter name, especially for patch 7/20. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev

Re: [PATCH] staging: android: ion: Skip sync if not mapped

2020-04-16 Thread Dan Carpenter
continue; > dma_sync_sg_for_cpu(a->dev, a->table->sgl, a->table->nents, > direction); > } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/2] staging: rtl8192u: Refactoring setKey function

2020-04-14 Thread Dan Carpenter
On Tue, Apr 14, 2020 at 09:01:18AM -0700, Joe Perches wrote: > On Tue, 2020-04-14 at 15:33 +0300, Dan Carpenter wrote: > > On Mon, Apr 13, 2020 at 03:01:28AM +, Camylla Goncalves Cantanheide > > wrote: > > > + > > > + for (i = 2; i < CAM_CONTENT_COUNT; i+

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Dan Carpenter
On Tue, Apr 14, 2020 at 03:22:59PM +0300, Ivan Safonov wrote: > On 4/14/20 2:56 PM, Dan Carpenter wrote: > > On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote: > > > > Remove function rtw_modular64 as all it does is call do_div. > > > > > > T

Re: [RFC] staging: vt6656: Add formula to the vnt_rf_addpower function

2020-04-14 Thread Dan Carpenter
e) / -5) * 2 + 5 : 0; ^^ I quite hate this postop. It would have been cleaner to write it like: return (rssi < base) ? ((rssi - (base - 1)) / -5) * 2 + 5 : 0 I'm sorry, I'm not clever enough to figure out the potential values of "rssi". Ho

Re: [PATCH 1/2] staging: rtl8192u: Refactoring setKey function

2020-04-14 Thread Dan Carpenter
gt; + > + /* Key Material */ > + if (!keycontent) > + return; > + > + for (i = 2; i < CAM_CONTENT_COUNT; i++) { > + write_nic_dword(dev, WCAMI, *keycontent++); This code was wrong in the original as well, but now that I see the bug let's fix i

Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64()

2020-04-14 Thread Dan Carpenter
sure that rounddown() is what we want. rtw_modular64() took the MOD of x. So it should be something like: tsf = pmlmeext->TSFValue - (pmlmeext->TSFValue % (pmlmeinfo->bcn_interval * 1024)) - 1024; /* us */ But what the heck is that even??? If pmlmeinfo->bcn_interval is

Re: [PATCH] taging: android: ashmem: Declared const key

2020-04-14 Thread Dan Carpenter
file_operations vmfile_fops; ^^ 4) Too many space characters. Please resend. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v1] staging: fbtft: fb_st7789v: Initialize the Display

2020-04-09 Thread Dan Carpenter
be: if (new_hardware) write_reg(par, PORCTRL, 0x05, 0x05, 0x00, 0x33, 0x33); else write_reg(par, PORCTRL, 0x08, 0x08, 0x00, 0x22, 0x22); Same comment for the rest of the patch. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v1] staging: fbtft: fb_st7789v: enabled inversion

2020-04-09 Thread Dan Carpenter
On Thu, Apr 09, 2020 at 11:24:05AM +0200, Oliver Graute wrote: > From: Oliver Graute > > Enable inversion mode What the heck is an inversion mode and why would you want it? regards, dasn carpenter ___ devel mailing list de...@linuxdriverproject.org h

Re: [PATCH v1] staging: fbtft: fb_st7789v: enabled inversion

2020-04-09 Thread Dan Carpenter
PWCTRL1, 0xA4, 0xA1); > > write_reg(par, MIPI_DCS_SET_DISPLAY_ON); > + > + /* enable inversion mode */ > + write_reg(par, 0x21); Use the define and delete the comment. write_reg(par, MIPI_DCS_ENTER_INVERT_MODE); regards, dan carpenter __

Re: [PATCH] Staging: rtl8192e: remove set but not used variable 'tmpRegC'

2020-04-07 Thread Dan Carpenter
nce, > bMaskDWord); > - tmpRegC = rtl92e_get_bb_reg(dev, rOFDM0_XCTxIQImbalance, > - bMaskDWord); > + rtl92e_get_bb_

Re: [PATCH 1/2] staging: rtl8188eu: remove unnecessary asignment

2020-04-06 Thread Dan Carpenter
hanged between > the test 'if (pLed->BlinkTimes == 0)' and the asignment. > Better to get rid of the bStopBlinking variable and this becomes more obvious. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://drive

Re: [PATCH 1/2] staging: rtl8188eu: remove unnecessary asignment

2020-04-06 Thread Dan Carpenter
On Mon, Apr 06, 2020 at 02:25:20PM +0300, Dan Carpenter wrote: > On Sun, Apr 05, 2020 at 01:22:29PM +0200, Michael Straube wrote: > > Remove unnecessary asignment in SwLedBlink1(). The code path with the > > asignment 'pLed->BlinkTimes = 0' is only executed when >

Re: [PATCH 3/3] staging: vt6656: Remove unnecessary local variable initialization

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

Re: [PATCH 2/3] staging: vt6656: Use define instead of magic number for tx_rate

2020-04-06 Thread Dan Carpenter
(unsigned int)vnt_frame_time[tx_rate]; > > - if (tx_rate <= 3) { > + if (tx_rate <= RATE_11M) { This is nice. And if we don't apply patch 1 then it's even nicer because then "tx_rate" is treated consistently. Reviewed-by: Dan Carpenter regards

Re: [PATCH 1/3] staging: vt6656: Use ARRAY_SIZE instead of define RATE_54M

2020-04-06 Thread Dan Carpenter
s not really a valid reason to change this. We have to assume that future programmers are not idiots. The only valid reason to do this is readability, but I'm not convinced the new version is more readable. regards, dan carpenter ___ deve

Re: [PATCH v3] staging: wilc1000: Use crc7 in lib/ rather than a private copy

2020-04-04 Thread Dan Carpenter
o-b from everyone from the > patch author to the patch committer (as recorded in git)? And the > one exception is that we don't need S-o-b for git pulls after that, > because the merge commits record the information? Yes. Also if people added their S-o-b for git merges it would change

Re: [PATCH v3] staging: wilc1000: Use crc7 in lib/ rather than a private copy

2020-04-03 Thread Dan Carpenter
On Thu, Apr 02, 2020 at 03:30:34PM +, George Spelvin wrote: > On Thu, Apr 02, 2020 at 11:27:45AM +0300, Dan Carpenter wrote: > > I don't know how this patch made it through two versions without anyone > > complaining that this paragraph should be done as a separate patch.

Re: [PATCH 01/01] staging: gasket: Fix incongruency in handling of sysfs entries creation

2020-04-03 Thread Dan Carpenter
on responsible for original patch which introduced the problem so that they can review it. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/2] staging: gasket: Fix 4 over 80 char warnings

2020-04-03 Thread Dan Carpenter
et(struct gasket_dev *gasket_dev) > { > + int idle_gen_reg = APEX_BAR2_REG_IDLEGENERATOR_IDLEGEN_IDLEREGISTER; > + Sorry, but I also hate these where we have a one time use temporary variable to get around the 80 character rule. Generally, avoid pointless indirection. The original code is better. regards, dan carpente

Re: [PATCH] staging: fsl-dpaa2: ethsw: Fix parenthesis alignment

2020-04-03 Thread Dan Carpenter
info > + *port_attr_info) I feel like the end result is worse than the original code because of how the type and the parameter name are on different lines. Sorry. :/ regards, dan carpenter ___ devel mailing list de...

Re: [PATCH 00/32] staging: wfx: rework the Tx queue

2020-04-03 Thread Dan Carpenter
hset itself, just to the surrounding code. Looks good. Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH -next] staging: greybus: fix a missing-check bug in gb_lights_light_config()

2020-04-02 Thread Dan Carpenter
ot; in gb_lights_channel_config() before we register the channel later in gb_lights_register_all(glights);. Now imagine that the register fails. Then when we're freeing it in __gb_lights_led_unregister() we see that the ->is_registered is false so we don'

Re: [PATCH 08/32] staging: wfx: simplify hif_handle_tx_data()

2020-04-02 Thread Dan Carpenter
^ This is on the TX side so it's probably okay, but one problem I have noticed is that we do this on the RX side as well with checking that if (skb->len < sizeof(struct hif_msg)) return -EINVAL; So we

Re: [PATCH 04/32] staging: wfx: remove "burst" mechanism

2020-04-02 Thread Dan Carpenter
^^ Why do we not want winner to be 3? It's unrelated to the patch but there should be a comment next to that code probably. 416 best = score; 417 winner = i; 418 } 419 } regards, dan carpenter __

Re: [PATCH 01/32] staging: wfx: add sanity checks to hif_join()

2020-04-02 Thread Dan Carpenter
gt;ibss_joined && !ssidlen, "joining an unknown BSS"); > body->infrastructure_bss_mode = !conf->ibss_joined; ^ Potential NULL dererefence because of the unchecked allocation. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH -next] staging: greybus: fix a missing-check bug in gb_lights_light_config()

2020-04-02 Thread Dan Carpenter
hannels = kcalloc(light->channels_count, > sizeof(struct gb_channel), GFP_KERNEL); > if (!light->channels) The clean up in this function is non-existant. :( regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [Update PATCH] x86/Hyper-V: Initialize Syn timer clock when it's

2020-04-02 Thread Dan Carpenter
This doesn't apply to today's linux-next. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 01/01] staging: gasket: Fix incongruency in handling of sysfs entries creation

2020-04-02 Thread Dan Carpenter
f1 ("staging: gasket: Replace macro __ATTR with __ATTR_NULL") That patch was never sent to the proper mailing list for review. Anyway, Luis, you will need to resend because your patch doesn't apply. Please read the first paragraphs of Documentation/process/email-clients.

Re: [PATCH v3 0/5] staging: rtl8712: rtl871x_xmit.{c, h} code style improvements

2020-04-02 Thread Dan Carpenter
Looks good. 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: rtl8188eu: refactor Efuse_GetCurrentSize()

2020-04-02 Thread Dan Carpenter
On Sun, Mar 29, 2020 at 12:04:50PM +0200, Michael Straube wrote: > Refactor while loop in Efuse_GetCurrentSize() to reduce indentation > level and clear line over 80 characters checkpatch warnings. > > Signed-off-by: Michael Straube Reviewed-by: Dan Carpenter regards, d

Re: [PATCH v2] staging: vt6656: add error code handling to unused variable

2020-04-02 Thread Dan Carpenter
Ignore this one. John sent it by mistake and has already sent a v3. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3] staging: wilc1000: Use crc7 in lib/ rather than a private copy

2020-04-02 Thread Dan Carpenter
d be done as a separate patch... > Cc: Adham Abozaeid > Cc: linux-wirel...@vger.kernel.org > Reviewed-by: Ajay Singh > Signed-off-by: George Spelvin > --- This should have you Signed-off-by. The Reviewed-by is kind of assumed so you can drop that bit. But everyone who tou

Re: [PATCH v2 1/5] staging: rtl8712: fix checkpatch long-line warning

2020-04-02 Thread Dan Carpenter
memory with the sz = (struct xmit_frame) * > NR_XMITFRAME, > + * Please allocate memory with sz = (struct xmit_frame) * NR_XMITFRAME, >* and initialize free_xmit_frame below. >* Please also apply free_txobj to link_up all the xmit_frames... Probably you could delete

Re: [PATCH v2 1/5] staging: rtl8712: fix checkpatch long-line warning

2020-04-02 Thread Dan Carpenter
^^^ You need to use your proper legal name here. Please capitalize normally like you would on a legal document. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 4/5] staging: rtl8712: fix multiline derefernce warning

2020-04-02 Thread Dan Carpenter
valuable name > for an automatic either. It's hungarian like. > "Hungarian like" means it starts with a "p". https://en.wikipedia.org/wiki/Hungarian_notation It's against the rules of kernel style. regards, dan carpenter

Re: [PATCH] staging: rtl8712: fix checkpatch warnings

2020-04-02 Thread Dan Carpenter
iables we don't what them to start with "p" to mean that they are a pointer. "psecpriv" should just be "secpriv". That name is still kind of rubbish, but it's not against the rules like starting with a p for pointer. regards, dan carpenter _

Re: [PATCH 0/4] media Kconfig reorg - part 2

2020-04-01 Thread Dan Carpenter
assumes we want to display menus so it was a lot of work and I gave up. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[staging:staging-testing 278/280] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)

2020-03-31 Thread Dan Carpenter
staging area If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285) # https://git.kernel.org/pub

Re: [PATCH] staging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* functions

2020-03-31 Thread Dan Carpenter
s, not style issues. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines

2020-03-31 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: vt6656: Use defines in vnt_mac_reg_bits_* functions

2020-03-31 Thread Dan Carpenter
ify the code. > > Fixes: 3017e587e368 ("staging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* > functions") > Suggested-by: Dan Carpenter > Signed-off-by: Oscar Carter > --- > drivers/staging/vt6656/baseband.c | 6 -- > drivers/staging/vt6656/card.

Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter

2020-03-24 Thread Dan Carpenter
l8188eu/core/rtw_led.c | 6 ++ > > > drivers/staging/rtl8188eu/include/drv_types.h | 2 ++ > > > drivers/staging/rtl8188eu/os_dep/os_intfs.c | 5 + > > > 3 files changed, 13 insertions(+) > > > > Why was this resent? Didn't I

Re: [PATCH 0/2] staging: vt6656: change function from always returning 0 to void

2020-03-24 Thread Dan Carpenter
Fold these two patches together so its just one patch. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: vt6656: Use ARRAY_SIZE instead of hardcoded size

2020-03-24 Thread Dan Carpenter
er 14. u8 cck_pwr_tbl[14]; u8 ofdm_pwr_tbl[14]; u8 ofdm_a_pwr_tbl[42]; If people change the size in the future (unlikely) and it causes a bug then they kind of deserve it because they need to ensure all the new stuff is initialized, right? If they change it and

Re: [PATCH] staging: vt6656: Use BIT() macro instead of hex value

2020-03-23 Thread Dan Carpenter
her defines. #define EnCFG_BBType_MASK (EnCFG_BBType_b | EnCFG_BBType_g) Otherwise it looks good. Can you change that one thing and then add my Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* functions

2020-03-23 Thread Dan Carpenter
ff(priv, MAC_REG_CHANNEL, 0xb0); > + vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, > + (BIT(7) | BIT(5) | BIT(4))); This one especially is just a lot longer now but still not clear. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables

2020-03-20 Thread Dan Carpenter
On Wed, Mar 18, 2020 at 02:31:27PM -0300, Camylla Cantanheide wrote: > Dear Dan Carpenter and Joe Perches, > > Thank you very much for the suggestions, I found the evaluation of both > very significant. Now, I have another perspective on variables. > > I solved the probl

Re: [PATCH 2/2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables

2020-03-17 Thread Dan Carpenter
;config" and "content" are clear enough. But at think about it, and consider all the options. Anyway, the reason that this patch needs to be re-written is because we want underscores in place of spaces for "key_type" and because "us_config" is against the rules.

Re: [PATCH] staging: vt6656: Use ARRAY_SIZE instead of hardcoded size

2020-03-17 Thread Dan Carpenter
b_rx_iq = 0; > + const int n_cck_pwr_tbl = ARRAY_SIZE(priv->cck_pwr_tbl); Please use ARRAY_SIZE(priv->cck_pwr_tbl) everywhere instead of introducing this new variable. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [Outreachy kernel] [PATCH v2] Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions

2020-03-13 Thread Dan Carpenter
Ignore this one. There was a typo in Greg's email address. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [Outreachy kernel] [PATCH v2] Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions

2020-03-13 Thread Dan Carpenter
Thanks! You sent the same patch twice. Next time put a note under the --- "Resending because I had a typo in Greg's email address". Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverp

Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: rtw_mlme: Remove unnecessary conditions

2020-03-13 Thread Dan Carpenter
The original patch description was basically fine. Outreachy reviews tend to be more pedantic about this sort of stuff than most maintainers. There are a couple who have very strict rules, but try to avoid those maintainers and your life will be happier. regards, dan carpenter

Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: rtw_mlme: Remove unnecessary conditions

2020-03-13 Thread Dan Carpenter
iv->ampdu_enable = true; > - } else { > - phtpriv->ampdu_enable = true; > - } > + /* remove this part because testbed AP should disable RX AMPDU > */ > + /* phtpriv->ampdu_enable = false; */ Please delete this

Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions

2020-03-13 Thread Dan Carpenter
time stamp when they wrote it. We don't know how to contact "hpfan" so it's useless. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: greybus: Use scnprintf() for avoiding potential buffer overflow

2020-03-12 Thread Dan Carpenter
pback_test:" > prefix since this is not a subsystem wide issue, bur rather a bug in a > specific user-space tool? I'm surprised that user-space even has scnprintf(). regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 3/5] staging: wfx: make warning about pending frame less scary

2020-03-12 Thread Dan Carpenter
v->buffered[i]) > + dev_warn(wvif->wdev->dev, "release station while %d > pending frame on queue %d", > + sta_priv->buffered[i], i); Why print a warning message at all if this is a normal situation? Jus

Re: [PATCH 2/5] staging: wfx: fix lines ending with a comma instead of a semicolon

2020-03-12 Thread Dan Carpenter
think of a reason why we should use semi-colons instead of commas. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RFC] ashmem: Fix ashmem shrinker nr_to_scan

2020-03-10 Thread Dan Carpenter
_size(range); > + sc->nr_to_scan -= range_size(range); ^^ Two space characters. In the old code we didn't *really* have to worry about sc->nr_to_scan dropping to negative, but now we do. ->nr_to_scan is unsigned so it would be a high positiv

Re: [PATCH v2 2/3] binder: do not initialize locals passed to copy_from_user()

2020-03-05 Thread Dan Carpenter
On Wed, Mar 04, 2020 at 10:13:40AM -0800, Kees Cook wrote: > On Tue, Mar 03, 2020 at 12:38:32PM +0300, Dan Carpenter wrote: > > The real fix is to initialize everything manually, the automated > > initialization is a hardenning feature which many people will disable. > > I

Re: [PATCH v2 2/3] binder: do not initialize locals passed to copy_from_user()

2020-03-03 Thread Dan Carpenter
ogged down in details. The annotation should be simple. If the automated system to initialize stack variables doesn't work 100% that's okay because it's a supplement and not a replacement for manually initializing stack variables. regards, dan carpenter

Re: [PATCH v2 2/3] binder: do not initialize locals passed to copy_from_user()

2020-03-03 Thread Dan Carpenter
tions(+), 1 deletion(-) > > > > diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h > > index 8a215c..3e034b5 100644 > > --- a/include/linux/uaccess.h > > +++ b/include/linux/uaccess.h > > @@ -138,7 +138,8 @@ _copy_to_user(void __user *, const void *, uns

Re: [PATCH v2] media: staging: tegra-vde: Use devm_platform_ioremap_resource_byname()

2020-03-02 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 v1] media: staging: tegra-vde: Use devm_platform_ioremap_resource_byname()

2020-03-02 Thread Dan Carpenter
On Mon, Mar 02, 2020 at 06:04:20PM +0300, Dmitry Osipenko wrote: > 02.03.2020 11:04, Dan Carpenter пишет: > > On Thu, Feb 27, 2020 at 09:09:15PM +0300, Dmitry Osipenko wrote: > >> This helps to make code cleaner a tad. > > > > Please don't start the commit

Re: [PATCH v2 2/3] binder: do not initialize locals passed to copy_from_user()

2020-03-02 Thread Dan Carpenter
m_user. > > This is being done exactly because it's immediately written to by > copy_to_user() > Clang is currently unable to figure out that copy_to_user() initializes > memory. ^^ typo s/to/from/. It feels more useful to annotate copy_from_user(). That woul

Re: [PATCH v3 00/18] wilc1000: move out of staging

2020-03-02 Thread Dan Carpenter
gt; 0) { ^^^ Delete. 707 wilc_frmw_to_host(wilc, buff_ptr, 708pkt_len, pkt_offset); 709 } 710

Re: [PATCH v1] media: staging: tegra-vde: Use devm_platform_ioremap_resource_byname()

2020-03-02 Thread Dan Carpenter
nerally read the subject or the full commit message but seldom both. Otherwise the patch looks very good. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: kpc2000: kpc2000_spi: Use new structure for SPI transfer delays

2020-03-01 Thread Dan Carpenter
delay_usecs); > + if (transfer->delay.value && > + (transfer->delay.unit == SPI_DELAY_UNIT_USECS)) > + udelay(transfer->delay.value); What if the units are in USEC now? We should probably not just ignore it right? regards,

Re: [PATCH v7 0/2] Add initial support for slimport anx7625

2020-02-24 Thread Dan Carpenter
ou fixed in v4 last November. What changed in this version? My guess is that nothing changed and you are just prodding us to re-review it... Feel free to say that also because we can't read your mind. regards, dan carpenter ___ devel mailin

Re: [PATCH] staging: rtl8723bs: core: remove redundant zero'ing of counter variable k

2020-02-24 Thread Dan Carpenter
(!(Bytetemp & 0x80)) && ++retry < 1000); > NTL is am wondering what will happen if k==1000 > and Bytetemp is still invalid. Will rtw_read8() fail or > simply return invalid data ? Yeah. That was my thought reviewing this patch as well.

[PATCH] staging: kpc2000: prevent underflow in cpld_reconfigure()

2020-02-24 Thread Dan Carpenter
This function should not allow negative values of "wr_val". If negatives are allowed then capping the upper bound at 7 is meaningless. Let's make it unsigned. Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers") Signed-off-by: Dan Carpen

Re: [PATCH] staging: bcm2835-camera: call function instead of macro

2020-02-18 Thread Dan Carpenter
On Wed, Feb 19, 2020 at 12:47:47AM +0530, Kaaira Gupta wrote: > On Tue, Feb 18, 2020 at 09:37:11PM +0300, Dan Carpenter wrote: > > On Tue, Feb 18, 2020 at 09:37:28PM +0530, Kaaira Gupta wrote: > > > Fix checkpatch.pl warning of 'macro argument reuse' in bcm2835-camera.h

Re: [PATCH] staging: bcm2835-camera: call function instead of macro

2020-02-18 Thread Dan Carpenter
mt.pix)->width, > + (&f->fmt.pix)->height, > + (&f->fmt.pix)->field, > + (&f->fmt.pix)->pixelformat, > + (&f->fmt.pix)->bytesperline, > + (&f->

Re: [PATCH] Staging: comedi: drivers: fixed errors warning coding style issue

2020-02-18 Thread Dan Carpenter
callback function. > + * Redback_insn_read() - A generic (*insn_read) for subdevice readback. ^ What is this??? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: staging: board: disabled driver

2020-02-17 Thread Dan Carpenter
nd or should I look at other drivers than board? > Thanks for your time! Use "make nconfig" and then press F8 and search for X86_INTEL_CE. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: vc04_services: Fix wrong early return in next_service_by_instance()

2020-02-17 Thread Dan Carpenter
o Diop-Gonzalez > --- Please use a Fixes tag. Fixes: a2203cfe0d84 ("staging: vc04_services: don't increment service refcount when it's not needed") That way we know it doesn't need to be backported. regards, dan carpenter ___ deve

Re: [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line

2020-02-12 Thread Dan Carpenter
On Wed, Feb 12, 2020 at 05:44:24PM +0300, Dan Carpenter wrote: > On Wed, Feb 12, 2020 at 05:20:35PM +0530, Kaaira Gupta wrote: > > When the driver tries to map a region, but the region has certain > > permissions, or when it attempts to open gasket with tgid, or when it > >

Re: [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line

2020-02-12 Thread Dan Carpenter
his patch'" in a commit description. But in staging we are pragmatists. So long as it's clear why you're writing the patch that's the main thing. The other problem with this code is that some of these messages are over 80 character

Re: [PATCH -next] staging: vc04_services: remove set but unused variable 'local_entity_uc'

2020-02-11 Thread Dan Carpenter
ce, > > write_lock_bh(&arm_state->susp_res_lock); > local_uc = ++arm_state->videocore_use_count; > - local_entity_uc = ++(*entity_uc); ^^ This ++ is required. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [[PATCH staging] 3/7] staging: wfx: fix init/remove vs IRQ race

2020-02-11 Thread Dan Carpenter
On Tue, Feb 11, 2020 at 11:39:31AM +0100, Michał Mirosław wrote: > On Tue, Feb 11, 2020 at 12:23:54PM +0300, Dan Carpenter wrote: > > On Tue, Feb 11, 2020 at 09:46:54AM +0100, Michał Mirosław wrote: > > > @@ -234,8 +234,8 @@ static void wfx_sdio_remove(struct sdio_func *fu

Re: [[PATCH staging] 3/7] staging: wfx: fix init/remove vs IRQ race

2020-02-11 Thread Dan Carpenter
> + } > > return ret; > } > @@ -234,11 +236,11 @@ static int wfx_spi_remove(struct spi_device *func) > struct wfx_spi_priv *bus = spi_get_drvdata(func); > > wfx_release(bus->core); > - wfx_free_common(bus->core); > // A few IRQ

Re: [PATCH 3/3] staging: wilc1000: refactor p2p action frames handling API's

2020-02-10 Thread Dan Carpenter
On Tue, Feb 11, 2020 at 09:51:01AM +0300, Dan Carpenter wrote: > On Mon, Feb 10, 2020 at 06:36:01PM +, ajay.kat...@microchip.com wrote: > > + if (sta_ch == WILC_INVALID_CHANNEL) > > + return; > > > > while (index < len) { > > This rang

Re: [PATCH 3/3] staging: wilc1000: refactor p2p action frames handling API's

2020-02-10 Thread Dan Carpenter
2P_ATTR_CHANNEL_LIST) > + ch_list_idx = index; > + else if (e->attr_type == IEEE80211_P2P_ATTR_OPER_CHANNEL) > + op_ch_idx = index; > + if (ch_list_idx && op_ch_idx) > + break; > +

[PATCH] staging: greybus: use after free in gb_audio_manager_remove_all()

2020-02-05 Thread Dan Carpenter
When we call kobject_put() and it's the last reference to the kobject then it calls gb_audio_module_release() and frees module. We dereference "module" on the next line which is a use after free. Fixes: c77f85bbc91a ("greybus: audio: Fix incorrect counting of 'ida'&

Re: [PATCH 1/2] staging: octeon: delete driver

2020-02-04 Thread Dan Carpenter
t; On Tue, 2020-02-04 at 10:21 +0300, Dan Carpenter wrote: > > > My advice is to delete all the COMPILE_TEST code. That stuff was a > > > constant source of confusion and headaches. > > > > I was also going to suggest this. Since the COMPILE_TEST has been a >

Re: [PATCH] staging: mt7621-dts: add dt node for 2nd/3rd uart on mt7621

2020-02-04 Thread Dan Carpenter
On Tue, Feb 04, 2020 at 05:59:21PM +0800, Chuanhong Guo wrote: > Hi! > > On Tue, Feb 4, 2020 at 5:47 PM Dan Carpenter wrote: > > > > Please use ./scripts/get_maintainer.pl to pick the CC list and resend. > > > > The MAINTAINERS file says Matthias Brugger is sup

Re: [PATCH] staging: mt7621-dts: add dt node for 2nd/3rd uart on mt7621

2020-02-04 Thread Dan Carpenter
Please use ./scripts/get_maintainer.pl to pick the CC list and resend. The MAINTAINERS file says Matthias Brugger is supposed to be CC'd and a couple other email lists. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org

Re: [PATCH 2/2] staging: octeon-usb: delete the octeon usb host controller driver

2020-02-03 Thread Dan Carpenter
My advice is to delete all the COMPILE_TEST code. That stuff was a constant source of confusion and headaches. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo

Re: [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.

2020-02-03 Thread Dan Carpenter
nd Google writes an article about it. Then everyone gets annoyed with us and shakes their head because OpenBSD never has Android vulnerabilities etc... > Signed-off-by: Malcolm Priestley > --- > drivers/staging/vt6656/dpc.c | 2 +- It appears that the vt6655 drive

Re: [PATCH v2] staging: exfat: remove 'vol_type' variable.

2020-01-30 Thread Dan Carpenter
gic numbers, and the rest are places > > where we're doing stuff with '.' and '..'. > > The vol_type variable is always set to 'EXFAT'. > The variable checks are unnessesary, so remove unused code. > > Signed-off-by: Tetsuhiro Kohada > Reviewed-

Re: [PATCH] staging: exfat: remove 'vol_type' variable.

2020-01-29 Thread Dan Carpenter
if (inode->i_ino == EXFAT_ROOT_INO) > inum = EXFAT_ROOT_INO; regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 10/22] staging: exfat: Rename variable "SecSize" to "sec_size"

2020-01-27 Thread Dan Carpenter
dev_info_t { > - u32 SecSize;/* sector size in bytes */ > + u32 sec_size;/* sector size in bytes */ > u32 DevSize;/* block device size in sectors */ ^^^ The comments aren't aligned any more. regards, dan c

Re: [PATCH 09/22] staging: exfat: Rename variable "Size" to "size"

2020-01-27 Thread Dan Carpenter
u32 offset;/* start sector number of the partition */ > - u32 Size; /* in sectors */ > + u32 size; /* in sectors */ > }; We just renamed all the struct members of this without changing any users. Which suggests that this is unused and can be deleted. reg

Re: [PATCH 07/22] staging: exfat: Rename variable "MilliSecond" to "milli_second"

2020-01-27 Thread Dan Carpenter
h > @@ -228,7 +228,7 @@ struct date_time_t { > u16 hour; > u16 minute; > u16 second; > - u16 MilliSecond; > + u16 milli_second; Normally we would just call it "ms". regards, dan carpenter

Re: [PATCH] staging: bcm2835-audio: fix warning of no space is necessary

2020-01-27 Thread Dan Carpenter
eam *alsa_stream = runtime->private_data; > - void *src = (void *) (substream->runtime->dma_area + rec->sw_data); > + void *src = (void *)(substream->runtime->dma_area + rec->sw_data); There is no need for the cast to begin with. regards, dan carpenter __

Re: [PATCH] staging: rtl8723bs: core: fix condition with no effect

2020-01-27 Thread Dan Carpenter
stuff looks like documentation but it's just a lot of garbage dead code so it's good to delete it. But unfortunately, these patches don't apply. Please read Documentation/process/email-clients.rst regards, dan carpenter __

Re: [PATCH] staging: comedi: drivers: fix condition with no effect

2020-01-27 Thread Dan Carpenter
* 'ao' boards have waveform analog outputs that are not > - * currently supported. > - */ > - s->type = COMEDI_SUBD_UNUSED; > } else { > s->type

Re: [RESEND PATCH] staging: exfat: Fix alignment warnings

2020-01-27 Thread Dan Carpenter
It looks like you sent this on Jan 11 and it was applied already. Why are you resending? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

<    1   2   3   4   5   6   7   8   9   10   >