This ISDN stuff is going to be deleted soon. Just leave it as is.
regards,
dan carpenter
;
> > You can remove the _t from the name as well.
> Should I remove the _t from all the enums/structs?
The _t means typedef (sort of, generally).
regards,
dan carpenter
is unnecessary and weird.
> res = _FAIL;
> goto exit;
> }
regards,
dan carpenter
les...
Exceptions can be made. It's probably not worth it though because
you have to be really aggressive about shooting down patches. Ask
yourself if there aren't more important battles to fight when human
lifespans are so short? I already rejected one change for you. To me
the new table looks okay, though.
regards,
dan carpenter
On Thu, Oct 10, 2019 at 10:51:45AM +0200, Alexander Gordeev wrote:
> On Wed, Oct 09, 2019 at 09:53:23PM +0300, Dan Carpenter wrote:
> > > > > + u32 *rd_flags = hw->dma_desc_table_rd.cpu_addr->flags;
> > > > > + u32 *wr_flags = hw->dma_desc_table_
l will not be initialized but used in
> function sm750_format_pll_reg(), which is potentially unsafe.
>
> Signed-off-by: Yizhuo
The patch is correct, but it doesn't apply to linux-next any more. Can
you re-write it on top of the most recent staging-next and resend?
regards,
dan carpenter
then you can still have my
Reviewed-by I guess.
Reviewed-by: Dan Carpenter
regards,
dan carpenter
gt; original cover letter and provides a clearer subject line.
The cover letter isn't stored in the git log so spelling is not
important. The original subjects were fine as well.
regards,
dan carpenter
if ap supports rx ampdu. */
> - if ((phtpriv->ampdu_enable == false) && (pregistrypriv->ampdu_enable ==
> 1)) {
> + if (!(phtpriv->ampdu_enable) && pregistrypriv->ampdu_enable == 1) {
Same.
> if (pregistrypriv->wifi_spec == 1) {
> /* remove this part because testbed AP should disable
> RX AMPDU */
> /* phtpriv->ampdu_enable = false; */
regards,
dan carpenter
; + xfi_direct_valid = xfi_indirect_valid;
> + xaui_indirect_valid = 1;
> + xaui_direct_valid = xaui_indirect_valid
The original code is fine here. Just ignore checkpatch on this.
regards,
dan carpenter
) warn: inconsistent returns
> 'sem:>scan.lock'
>
> I also consider it as a false positive.
Yeah. I thought it might be. The beauty of 0day bot is that normally
the warnings come really quick after the original author wrote the code
so it's fresh in their heads. I suspected it might be
On Wed, Oct 09, 2019 at 04:58:12PM +0200, Alexander Gordeev wrote:
> On Wed, Oct 09, 2019 at 03:14:41PM +0300, Dan Carpenter wrote:
> > > +config AVALON_DMA_PCI_VENDOR_ID
> > > + hex "PCI vendor ID"
> > > + default "0x1172"
> > > +
> &
On Wed, Oct 09, 2019 at 09:31:41AM -0700, Nick Desaulniers wrote:
> On Wed, Oct 9, 2019 at 7:30 AM Dan Carpenter wrote:
> >
> > On Wed, Oct 09, 2019 at 04:21:20PM +0200, Rasmus Villemoes wrote:
> > > On 09/10/2019 15.56, Dan Carpenter wrote:
> > > > That
On Tue, Oct 01, 2019 at 09:58:55PM +0300, Dan Carpenter wrote:
> On Tue, Oct 01, 2019 at 06:13:21PM +0300, Denis Efremov wrote:
> > Just found an official documentation to this issue:
> > https://gcc.gnu.org/gcc-4.9/porting_to.html
> > "Null pointer checks may be optimi
On Wed, Oct 09, 2019 at 04:21:20PM +0200, Rasmus Villemoes wrote:
> On 09/10/2019 15.56, Dan Carpenter wrote:
> > That's because glibc strlen is annotated with __attribute_pure__ which
> > means it has no side effects.
>
> I know, except it has nothing to do with gl
c:5:2: warning: statement with no effect [-Wunused-value]
> strlen(s);
> ^
That's because glibc strlen is annotated with __attribute_pure__ which
means it has no side effects.
regards,
dan carpenter
while (!kthread_should_stop())
> + cond_resched();
> +
> + return ret;
> +}
> +
> +struct kthread_xfer_rw_sg_data {
> + struct dma_chan *chan;
> + enum dma_data_direction dir;
> + dma_addr_t dev_addr;
> + struct scatterlist *sg;
> + unsigned int sg_len;
> + void (*xfer_callback)(void *dma_async_param);
> +};
> +
> +static int __kthread_xfer_rw_sg(void *_data)
> +{
> + struct kthread_xfer_rw_sg_data *data = _data;
> +
> + return kthread_xfer_rw_sg(data->chan, data->dir,
> + data->dev_addr, data->sg, data->sg_len,
> + data->xfer_callback);
> +}
> +
> +static int __xfer_rw_sg_smp(struct dma_chan *chan,
> + enum dma_data_direction dir,
> + dma_addr_t dev_addr,
> + struct scatterlist *sg, unsigned int sg_len,
> + void (*xfer_callback)(void *dma_async_param))
> +{
> + struct kthread_xfer_rw_sg_data data = {
> + chan, dir,
> + dev_addr, sg, sg_len,
> + xfer_callback
> + };
> + struct task_struct *task;
> + struct task_struct **tasks;
> + int nr_tasks = dmas_per_cpu * num_online_cpus();
> + int n, cpu;
> + int ret = 0;
> + int i = 0;
> +
> + tasks = kmalloc(sizeof(tasks[0]) * nr_tasks, GFP_KERNEL);
kmalloc_array().
> + if (!tasks)
> + return -ENOMEM;
> +
> + for (n = 0; n < dmas_per_cpu; n++) {
> + for_each_online_cpu(cpu) {
> + if (i >= nr_tasks) {
> + ret = -ENOMEM;
> + goto kthread_err;
> + }
> +
> + task = kthread_create(__kthread_xfer_rw_sg,
> + , "av-dma-sg-%d-%d", cpu, n);
> + if (IS_ERR(task)) {
> + ret = PTR_ERR(task);
> + goto kthread_err;
> + }
> +
> + kthread_bind(task, cpu);
> +
> + tasks[i] = task;
> + i++;
> + }
> + }
> +
> + for (i = 0; i < nr_tasks; i++)
> + wake_up_process(tasks[i]);
> +
> + /*
> + * Run child kthreads until user sent a signal (i.e Ctrl+C)
> + * and clear the signal to avid user program from being killed.
> + */
> + schedule_timeout_interruptible(MAX_SCHEDULE_TIMEOUT);
> + flush_signals(current);
> +
> +kthread_err:
> + for (i = 0; i < nr_tasks; i++)
> + kthread_stop(tasks[i]);
This will Oops when you try free uninitialized data.
The way to do error handling is:
1) Use good label names which say what the label does. "goto free_foo;"
2) Keep track of the most recently allocated thing. "foo"
3) Free most recent thing. That will free everything and it *won't*
free things which haven't been allocated.
Here it's complicated because we have to break out of a loop. The rules
for loops are:
4) free the partial iteration before the goto.
5) free down to zero
for (i = 0; i < cnt; i++) {
foo = alloc();
if (!foo)
goto unwind_loop;
foo->bar = alloc();
if (!bar) {
free(foo);
goto unwind_loop;
}
foo->bar->baz = alloc();
if (!baz) {
free(foo->bar);
free(foo);
goto unwind_loop;
}
array[i] = foo;
}
return 0;
unwind_loop:
while (--i >= 0) {
free(array[i]->bar->baz);
free(array[i]->bar);
free(array[i]);
}
free(array);
return -ENOMEM;
My other comment would be that you're sacrificing a lot of readability
to add debug code to this driver... It's hard to review.
> +
> + kfree(tasks);
> +
> + return ret;
> +}
regards,
dan carpenter
On Wed, Oct 09, 2019 at 02:30:32PM +0300, Dan Carpenter wrote:
> > + platform = kzalloc(sizeof(*platform), GFP_KERNEL);
> > + if (!platform) {
> > + DRM_DEV_ERROR(dev, "failed to allocate driver data\n");
> > + ret = -ENOMEM;
> > +
+ src += xfer_len;
> +
> + len -= xfer_len;
> + }
> +
> + *_set = set;
> +
> + return nr_descs;
> +}
> +
> +int setup_descs_sg(struct dma_desc *descs, unsigned int desc_id,
> +enum dma_data_direction direction,
> +dma_addr_t dev_addr,
> +struct scatterlist *__sg, unsigned int __sg_len,
> +struct scatterlist *sg_start, unsigned int sg_offset,
> +struct scatterlist **_sg_stop, unsigned int *_sg_set)
> +{
> + struct scatterlist *sg;
> + dma_addr_t sg_addr;
> + unsigned int sg_len;
> + unsigned int sg_set;
> + int nr_descs = 0;
> + int ret;
> + int i;
> +
> + /*
> + * Find the SGE that the previous xfer has stopped on -
> + * it should exist.
> + */
> + for_each_sg(__sg, sg, __sg_len, i) {
> + if (sg == sg_start)
> + break;
> +
> + dev_addr += sg_dma_len(sg);
> + }
> +
> + if (WARN_ON(i >= __sg_len))
> + return -EINVAL;
> +
> + /*
> + * The offset can not be longer than the SGE length.
> + */
> + sg_len = sg_dma_len(sg);
> + if (WARN_ON(sg_len < sg_offset))
> + return -EINVAL;
> +
> + /*
> + * Skip the starting SGE if it has been fully transmitted.
> + */
> + if (sg_offset == sg_len) {
> + if (WARN_ON(sg_is_last(sg)))
> + return -EINVAL;
> +
> + dev_addr += sg_len;
> + sg_offset = 0;
> +
> + i++;
> + sg = sg_next(sg);
> + }
> +
> + /*
> + * Setup as many SGEs as the controller is able to transmit.
> + */
> + BUG_ON(i >= __sg_len);
> + for (; i < __sg_len; i++) {
> + sg_addr = sg_dma_address(sg);
> + sg_len = sg_dma_len(sg);
> +
> + if (sg_offset) {
> + if (unlikely(sg_len <= sg_offset)) {
> + BUG();
> + return -EINVAL;
> + }
> +
> + dev_addr += sg_offset;
> + sg_addr += sg_offset;
> + sg_len -= sg_offset;
> +
> + sg_offset = 0;
> + }
> +
> + ret = setup_descs(descs, desc_id, direction,
> + dev_addr, sg_addr, sg_len, _set);
> + if (ret < 0)
> + return ret;
> +
> + if (unlikely((desc_id + ret > DMA_DESC_MAX) ||
> + (nr_descs + ret > DMA_DESC_MAX))) {
> + BUG();
> + return -ENOMEM;
> + }
> +
> + nr_descs += ret;
> + desc_id += ret;
> +
> + if (desc_id >= DMA_DESC_MAX)
> + break;
We already checked for this.
> +
> + if (unlikely(sg_len != sg_set)) {
> + BUG();
> + return -EINVAL;
> + }
> +
> + if (sg_is_last(sg))
> + break;
> +
> + descs += ret;
> + dev_addr += sg_len;
> +
> + sg = sg_next(sg);
> + }
> +
regards,
dan carpenter
Are you sure you sent the correct patch? This has many of the same
style issues I mentioned in the previous email. The error handling
in edid_read() is wrong. probe() will still crash if allocating the
work queue fails.
On Wed, Oct 09, 2019 at 09:28:02AM +, Xin Ji wrote:
> The ANX7625 is
FIG && cs->conf_cache >= 0)
I like these changes but Greg doesn't. So don't bother with this one.
> return cs->conf_cache;
>
> val = readq(addr);
The rest of the changes are fine. Split them into multiple patches and
resend.
regards,
dan carpenter
On Tue, Oct 08, 2019 at 04:44:25PM -0300, Jason Gunthorpe wrote:
> On Sat, Oct 05, 2019 at 08:23:37AM +0300, Dan Carpenter wrote:
> > The issue is in drivers/infiniband/core/uverbs_std_types_cq.c in the
> > UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE) func
On Tue, Oct 08, 2019 at 04:21:54PM +0200, Matteo Croce wrote:
> On Tue, Oct 8, 2019 at 3:16 PM Dan Carpenter wrote:
> >
> > The subject doesn't match the patch. It should just be "remove useless
> > printk".
> >
> > regards,
> > dan carp
The subject doesn't match the patch. It should just be "remove useless
printk".
regards,
dan carpenter
sizeof(msg->rx_mic_key),
"inconsistent data");
That doesn't look too good still... The error message is sort of
rubbish also. Anyway the operator goes on the first line.
regards,
dan carpenter
re shouldn't be a
space after the cast. It's to mark that it's a high precedence
operation.
cpu_to_le32s((uint32_t *));
regards,
dan carpenter
.oui = { 0x50, 0x6F, 0x9A },
Please don't do unrelated white space changes in their own patches.
> }, {
> .ie_id= WLAN_EID_HT_OPERATION,
> .has_changed = 1,
regards,
dan carpenter
On Mon, Oct 07, 2019 at 10:21:07AM +0100, Jonathan Cameron wrote:
> On Sun, 6 Oct 2019 21:14:40 +0300
> Dan Carpenter wrote:
>
> > On Sun, Oct 06, 2019 at 09:51:33AM +0100, Jonathan Cameron wrote:
> > > On Thu, 26 Sep 2019 14:36:30 +0300
> > > Dan Carpenter wr
^^
Delete these extra spaces.
regards,
dan carpenter
On Sun, Oct 06, 2019 at 09:51:33AM +0100, Jonathan Cameron wrote:
> On Thu, 26 Sep 2019 14:36:30 +0300
> Dan Carpenter wrote:
>
> > On Thu, Sep 26, 2019 at 11:06:39AM +, Ardelean, Alexandru wrote:
> > > On Thu, 2019-09-26 at 11:10 +0300, Dan Carpenter wr
could potentially lead to an array underflow. My concern would be where
cq->vector is used in the create_cq() function from the cxgb4 driver.
Fixes: 9ee79fce3642 ("IB/core: Add completion queue (cq) object actions")
Signed-off-by: Dan Carpenter
---
drivers/infiniband/core/uverbs.h
s: 9e28f6532c61 ("ASoC: fsl_mqs: Add MQS component driver")
Signed-off-by: Dan Carpenter
---
sound/soc/fsl/fsl_mqs.c | 27 +++
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c
index c1619a553514.
Or we could apply your other patch which trumps both this patch and the
patch to the TODO.
regards,
dan carpenter
that it's
not really useful. Future auditors should look for places which call
fs_set_vol_flags(sb, VOL_CLEAN); instead. That's exactly the places
which call fs_sync().
regards,
dan carpenter
On Wed, Oct 02, 2019 at 03:01:35PM -0400, Valdis Klētnieks wrote:
> We've seen several incorrect patches for fs_sync() calls in the exfat driver.
> Add code to the TODO that explains this isn't just a delete code and refactor,
> but that actual analysis of when the filesystem should be flushed to
aybe in olden times "result" used to save positive error codes instead
of negative error codes but now it's just negatives and zero on success.
There is no reason for the exit label either, we could just return
directly.
So could you redo it and get rid of "result" entirely? Otherwise it
just causes more bugs like this.
regards,
dan carpenter
kes direct call to bdev_sync() where
> needed and removes fs_sync definition.
>
> Signed-off-by: Saiyam Doshi
Reviewed-by: Dan Carpenter
regards,
dan carpenter
On Wed, Oct 02, 2019 at 02:53:17PM +0100, Colin Ian King wrote:
> On 02/10/2019 14:42, Dan Carpenter wrote:
> > On Wed, Oct 02, 2019 at 04:33:57PM +0300, Dan Carpenter wrote:
> >> On Wed, Oct 02, 2019 at 12:08:49PM +0100, Colin King wrote:
> >>> From: Colin Ian Ki
On Wed, Oct 02, 2019 at 04:33:57PM +0300, Dan Carpenter wrote:
> On Wed, Oct 02, 2019 at 12:08:49PM +0100, Colin King wrote:
> > From: Colin Ian King
> >
> > The expression !(hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10 is always zero, so
> > the masking opera
GMAC_HWFEAT_TSSEL) >> 12;
> dma_cap->av = (hw_cap & XGMAC_HWFEAT_AVSEL) >> 11;
> - dma_cap->av &= !(hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10;
> + dma_cap->av &= !((hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10);
There is no point to the shift at all.
regards,
dan carpenter
On Wed, Oct 02, 2019 at 04:25:06PM +0300, Dan Carpenter wrote:
> On Wed, Oct 02, 2019 at 11:08:44AM +0100, Colin King wrote:
> > From: Colin Ian King
> >
> > Variable pval is being assigned a value that is never read. The
> > assignment is redundant and hence can be
/*
>* When not using any prescaler, the clock period in nanoseconds
>* is not an integer so round it half up instead of
Are you sure? It looks used to me.
regards,
dan carpenter
wdev->ssid instead of priv->mesh_ssid"). The return value was
never used so it's not clear what returning 1 vs 0 was supposed to mean.
lbs_init_mesh() should just be a void function.
Reviewed-by: Dan Carpenter
regards,
dan carpenter
ted as non-NULL.
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
size_t __n) __THROW __nonnull ((1, 2));
We aren't going to do that in the kernel. A second difference is that
in the kernel we use -fno-delete-null-pointer-checks so it doesn't
delete the NULL checks.
regards,
dan carpenter
the
kernel there are lots of places which do a zero size memcpy().
The glibc attitude is "the standard allows us to put knives here" so
let's put knives everywhere in the path. And the GCC attitude is let's
silently remove NULL checks instead of just printing a warning that the
NULL check isn't required... It could really make someone despondent.
regards,
dan carpenter
_ON() and added WARN_ON().
> Removed unnecessary parentheses:
> *(dir_entry->Name) - > *dir_entry->Name
Do these other two things in separate patches.
regards,
dan carpenter
On Sat, Sep 28, 2019 at 07:22:33PM -0500, Jesse Barton wrote:
> Fixed coding style issues with camelcase on functions and various parentheses
> that were not needed
>
Do this as two separate patches.
regards,
dan carpenter
uct
> file_id_t *fid)
I think now checkpatch will complain that the line is too long? What we
want here is:
static int ffs_create_file(struct inode *inode, char *path, u8 mode,
struct file_id_t *fid)
[tab][tab][tab][space][space][space]struct file_id_t *fid)
So they line up.
regards,
dan carpenter
ot;);
353
> padapter->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
> - if (!padapter->HalData)
> - DBG_88E("cant not alloc memory for HAL DATA\n");
> + if (!padapter->HalData) {
> + DBG_88E("Failed to allocate memory for HAL data\n");
Remove this debug printk.
> + goto free_adapter;
> + }
regards,
dan carpenter
On Thu, Sep 26, 2019 at 05:53:10AM -0700, Guenter Roeck wrote:
> On Wed, Sep 25, 2019 at 02:02:19PM +0300, Dan Carpenter wrote:
> > The "port->typec_caps.data" and "port->typec_caps.type" variables are
> > enums and in this context GCC will treat them
or human beings as well. Another option
would be to just delete the "if (padapter->HalFunc.GetHwRegHandler)"
check which would also silence the false positive. A third option would
be to add "rtw_hal_get_hwreg 2" to the
~/smatch/smatch_data/kernel.ignore_uninitialized_param file.
regards,
dan carpenter
e the one goto and the error label. No need to
re-number everything. You can audit a patch with properly named labels
from directly within your email client instead of needing to re-review
the whole function in the source.
regards,
dan carpenter
Sorry, for not replying. I got sick last week so I was out of office.
Feeling better now.
regards,
dan carpenter
Looks good! Thanks for this, Joe.
regards,
dan carpenter
this fix before. ignore. apologies.
Haha. I used to do this all the time. Now my QC script searches my
outbox. I still send duplicates sometimes if I'm travelling and forget
to copy my outbox over.
regards,
dan carpenter
Looks good. Thanks!
regards,
dan carpenter
essages. :/
> + ret = -ETIMEDOUT;
return -ETIMOUT;
> + break;
> + }
> + timeout++;
> + }
> + if (ret) {
> + pr_err("ACP is not powered on status:%d\n&quo
On Thu, Sep 26, 2019 at 11:06:39AM +, Ardelean, Alexandru wrote:
> On Thu, 2019-09-26 at 11:10 +0300, Dan Carpenter wrote:
> > [External]
> >
> > The "t" variable is unsigned so it can't be less than zero. We really
> > are just trying to prevent divide
ot;pinctrl: ns2: add pinmux driver support for Broadcom NS2
SoC")
Signed-off-by: Dan Carpenter
---
drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
index 2
The "t" variable is unsigned so it can't be less than zero. We really
are just trying to prevent divide by zero bugs so just checking against
zero is sufficient.
Signed-off-by: Dan Carpenter
---
drivers/iio/imu/adis16480.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
> the code for some more valid reason.
Just use `git blame -w`.
This probably came from a Smatch warning. Smatch warns very seldom
warns about style issues, but in this case the indenting is legitimately
bad.
regards,
dan carpenter
The "template.id" variable is an enum and in this context GCC will
treat it as an unsigned int so it can never be less than zero.
Fixes: 8a9782346dcc ("ASoC: topology: Add topology core")
Signed-off-by: Dan Carpenter
---
sound/soc/soc-topology.c | 2 +-
1 file change
ressure.c: convert to use match_string() helper")
Signed-off-by: Dan Carpenter
---
mm/vmpressure.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index f3b50811497a..fe077500cf20 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpres
The "mode" variable is an enum and in this context GCC treats it as an
unsigned int so the error handling is never triggered.
Fixes: 51d075660457 ("bq20z75: Add support for charge properties")
Signed-off-by: Dan Carpenter
---
drivers/power/supply/sbs-battery.c | 2 +
The "port->typec_caps.data" and "port->typec_caps.type" variables are
enums and in this context GCC will treat them as an unsigned int so they
can never be less than zero.
Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together")
Signed-off-by: D
The "iface" variable is an enum and in this context GCC treats it as
an unsigned int so the error handling is never triggered.
Fixes: b78624125304 ("of_mdio: Abstract a general interface for phy connect")
Signed-off-by: Dan Carpenter
---
drivers/of/of_mdio.c | 2 +-
1 file
to the original
email and we apply the v1 patch that's the only thing to avoid.
regards,
dan carpenter
step process, then this one is OK.
It has to be done in one step.
regards,
dan carpenter
E_MAX_H2C_BOX_NUMS;
>
> - } while ((!bcmd_down) && (retry_cnts--));
> + } while (!bcmd_down);
Just get rid of the whole do while loop, because it just goes through
one time. It doesn't loop. Get rid of bcmd_down as well.
regards,
dan carpenter
: Use rcu_segcblist for no-CBs CPUs")
Signed-off-by: Dan Carpenter
---
kernel/rcu/tree_plugin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 2defc7fe74c3..fa08d55f7040 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/
"ret" should be a negative error code here, but it's either success or
possibly uninitialized.
Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller
list")
Signed-off-by: Dan Carpenter
---
drivers/nvme/host/core.c | 5 +++--
1 file changed, 3 insert
This patch deletes a stray tab.
Signed-off-by: Dan Carpenter
---
I don't use Fixes tags for whitespace but the commit that added this
driver was commit 389711b37493 ("firmware: Add Turris Mox rWTM firmware
driver"). When we're adding a driver, it really helps if we use
The first argument to WARN() is supposed to be a condition. The
original code will just print the mdname() instead of the full warning
message.
Fixes: c84a1372df92 ("md/raid0: avoid RAID0 data corruption due to layout
confusion.")
Signed-off-by: Dan Carpenter
---
drivers/md/raid0.c
for
endian bugs until this gets fixed. It's been broken for a month so
we'll probably get a flood of patches marking functions as static once
we patch this and people start seeing that warning again.
regards,
dan carpenter
Thanks! Looks good.
regards,
dan carpenter
functions and replaced them with NULL in function array.
Thanks!
regards,
dan carpenter
On Wed, Sep 18, 2019 at 06:53:49PM +0900, Ju Hyung Park wrote:
> Hi Dan,
>
> On Wed, Sep 18, 2019 at 6:27 PM Dan Carpenter
> wrote:
> > Put it in drivers/staging/sdfat/.
>
> It'll conflict with the current exfat staging drivers.
Use Kconfig.
> And moreover, I
staging. The staging tree is going to have tons and tons of white space
fixes so backports are a pain. All development needs to be upstream
first where the staging driver is upstream. Otherwise we should just
wait for Samsung to get it read to be merged in fs/ and not through the
staging tree.
regards,
dan carpenter
union iwreq_data *wrqu, char
> *extra)
> {
> - int ret = 0;
> - return ret;
> + return 0;
> }
Just get rid of the whole function. Replace the pointer in the function
array with a NULL.
regards,
dan carpenter
On Mon, Sep 16, 2019 at 09:24:26PM +0200, Christophe JAILLET wrote:
> Le 16/09/2019 à 08:28, Dan Carpenter a écrit :
> > On Fri, Sep 13, 2019 at 09:57:09AM +0200, Maxime Ripard wrote:
> > > Hi Christophe,
> > >
> > > On Thu, Sep 12, 2019 at 10:44:
>= 0)
998 ret = comedi_device_postconfig(dev);
999 if (ret < 0) {
1000 comedi_device_detach(dev);
^
1001 module_put(driv->module);
1002 }
1003 /* On s
On Mon, Sep 16, 2019 at 10:29:36PM +0200, Christophe JAILLET wrote:
> 'iommu_group_get_for_dev()' never returns NULL, so this test can be
> simplified a bit.
>
It used to until commit 72dcac633475 ("iommu: Warn once when device_group
callback returns NULL").
Reviewed-by: Dan
for networking, but it's kind of a pain in the butt and I
mess up surpisingly often for how much effort I put into getting it
right.
regards,
dan carpenter
but that still wouldn't tell us what the valid
data is. It's hard to know the right answer from a static analysis
point of view.
regards,
dan carpenter
On Sat, Sep 14, 2019 at 06:18:03PM +0300, Ivan Safonov wrote:
> On 9/10/19 2:59 PM, Dan Carpenter wrote:
> > On Sun, Sep 08, 2019 at 12:00:26PM +0300, Ivan Safonov wrote >> rtw_malloc
> > prevents the use of kmemdup/kzalloc and others.
> > >
>
On Fri, Sep 13, 2019 at 01:09:37AM -0600, Jonathan Corbet wrote:
> On Wed, 11 Sep 2019 16:11:29 -0600
> Jens Axboe wrote:
>
> > On 9/11/19 12:43 PM, Dan Carpenter wrote:
> > >
> > > I kind of hate all this extra documentation because now everyone thinks
> &
You did it. Well done. :P
Reviewed-by: Dan Carpenter
regards,
dan carpenter
No worries... We all have days like that occasionally. :P
regards,
dan carpenter
ght whitespace at the end of
a line. I don't remember how it's done now but I googled it for you.
https://vim.fandom.com/wiki/Highlight_unwanted_spaces
regards,
dan carpenter
ne who tries to tag their patches is going to do it badly anyway.
regards,
dan carpenter
^^^
Get rid of this.
> return FFS_INVALIDPATH;
>
> - strcpy(name_buf, path);
> + if (strscpy(name_buf, path, sizeof(name_buf)) < 0)
> + return FFS_INVALIDPATH;
regards,
dan carpenter
On Wed, Sep 11, 2019 at 12:24:23PM +0200, Sandro Volery wrote:
>
>
> > On 11 Sep 2019, at 12:06, Dan Carpenter wrote:
> >
> > On Wed, Sep 11, 2019 at 11:42:19AM +0200, Sandro Volery wrote:
> >> Use strscpy instead of strcpy in exfat_core.c, and add a check
^
Delete this as it is no longer required.
> return FFS_INVALIDPATH;
>
> - strcpy(name_buf, path);
> + if (strscpy(name_buf, path, sizeof(name_buf)) < 0)
> + return FFS_INVALIDPATH;
regards,
dan carpenter
On Wed, Sep 11, 2019 at 11:21:44AM +0200, Sandro Volery wrote:
>
> On 11 Sep 2019, at 11:17, Dan Carpenter wrote:
> >
> > On Wed, Sep 11, 2019 at 11:04:38AM +0200, Sandro Volery wrote:
> >>
> >>
> >>>> On 11 Sep 2019, at 10:52, Dan Carpent
On Wed, Sep 11, 2019 at 11:04:38AM +0200, Sandro Volery wrote:
>
>
> > On 11 Sep 2019, at 10:52, Dan Carpenter wrote:
> >
> > On Wed, Sep 11, 2019 at 08:23:59AM +0200, Sandro Volery wrote:
> >> strcpy was used multiple times in strcpy to write into dev->nam
"pow%d");
> + strscpy(dev->name, "pow%d", sizeof(dev->name));
Is there a program which is generating a warning for this code? We know
that "pow%d" is 6 characters and static analysis tools can understand
this code fine so we know it's safe.
regards,
dan carpenter
the "name_buf" is a shared buffer. wow wow wow. This seems very
racy.
regards,
dan carpenter
On Wed, Sep 11, 2019 at 09:30:47AM +0800, maowenan wrote:
>
>
> On 2019/9/11 3:22, Dan Carpenter wrote:
> > On Tue, Sep 10, 2019 at 09:57:10PM +0300, Dan Carpenter wrote:
> >> On Tue, Sep 10, 2019 at 03:13:42PM +0800, Mao Wenan wrote:
> >>> There are mor
On Tue, Sep 10, 2019 at 09:57:10PM +0300, Dan Carpenter wrote:
> On Tue, Sep 10, 2019 at 03:13:42PM +0800, Mao Wenan wrote:
> > There are more parentheses in if clause when call sctp_get_port_local
> > in sctp_do_bind, and redundant assignment to 'ret'. This patch is to
ch is either 0,1 or a pointer
casted to long. It's not documented what it means and neither of the
callers use the return since commit 62208f12451f ("net: sctp: simplify
sctp_get_port").
Probably it should just return a bool?
regards,
dan carpenter
901 - 1000 of 9301 matches
Mail list logo