...@01.org
Cc: Julia Lawall
Subject: Re: [PATCH V4 04/11] megaraid_sas: SAS3.5 Generic Megaraid Controllers
Stream Detection and IO Coalescing
In-Reply-To: <1481065220-18431-5-git-send-email-sasikumar...@broadcom.com>
Hi Sasikumar,
[auto build test WARNING on scsi/for-next]
[also buil
Hello,
I don't have the compete context, but I have the impression that there
should be a goto done at which sp can be NULL.
julia
-- Forwarded message --
Date: Thu, 19 Jan 2017 12:38:31 +0800
From: kbuild test robot
To: kbu...@01.org
Cc: Julia Lawall
Subject: Re: [PATCH
From: Julia Lawall
Correct typo in the name of the type given to sizeof. Because it is the
size of a pointer that is wanted, the typo has no impact on compilation or
execution.
This problem was found using Coccinelle (http://coccinelle.lip6.fr/). The
semantic patch used can be found in
From: Julia Lawall
Correct typo in the name of the type given to sizeof. Because it is the
size of a pointer that is wanted, the typo has no impact on compilation or
execution.
This problem was found using Coccinelle (http://coccinelle.lip6.fr/). The
semantic patch used can be found in
These patches fix typos in the name of a type referenced in a sizeof
command. These problems are not caught by the compiler, because they have
no impact on execution - the size of a pointer is independent of the size
of the pointed value.
The semantic patch that finds these problems is shown belo
From: Julia Lawall
Delete NULL test on array (always false).
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
@r@
type T;
T [] e;
position p;
@@
e ==@p NULL
@ disable fld_to_ptr@
expression e;
identifier f;
position r.p
Delete NULL test on array. The complete semantic patch that finds this
problem is as follows: (http://coccinelle.lip6.fr/)
//
@r@
type T;
T [] e;
position p;
@@
(
e ==@p NULL
|
e !=@p NULL
|
!@p e
)
@ disable fld_to_ptr@
expression e;
identifier f;
position r.p;
@@
(
* (e.f) ==@p NULL
|
*
> > diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> > index 67283ef..62e276b 100644
> > --- a/drivers/scsi/dpt_i2o.c
> > +++ b/drivers/scsi/dpt_i2o.c
> > @@ -1169,11 +1169,6 @@ static struct adpt_device*
> > adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u6
> > if(chan < 0 |
On Fri, 8 Aug 2014, James Bottomley wrote:
> On Fri, 2014-08-08 at 19:03 +0200, Julia Lawall wrote:
> > > > diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> > > > index 67283ef..62e276b 100644
> > > > --- a/drivers/scsi/dpt_i2o
>From nobody Sat Aug 9 08:17:15 CEST 2014
From: Julia Lawall
To: Adaptec OEM Raid Solutions
Cc: "James E.J. Bottomley"
,linux-scsi@vger.kernel.org,linux-ker...@vger.kernel.org
Subject: [PATCH] dpt_i2o: delete unnecessary null test on array
From: Julia Lawall
Convert a NULL tes
firmare -> firmware
---
drivers/media/dvb-frontends/mn88473.c |2 +-
drivers/net/wireless/ath/ath6kl/core.h |2 +-
drivers/net/wireless/marvell/mwifiex/pcie.c |2 +-
drivers/scsi/pm8001/pm8001_init.c |2 +-
drivers/scsi/snic/snic_fwint.h |2 +
firmare -> firmware
Signed-off-by: Julia Lawall
---
drivers/scsi/pm8001/pm8001_init.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c
b/drivers/scsi/pm8001/pm8001_init.c
index 6bd7bf4..fdbee8b4 100644
--- a/drivers/scsi/pm8
firmare -> firmware
Signed-off-by: Julia Lawall
---
drivers/scsi/snic/snic_fwint.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/snic/snic_fwint.h b/drivers/scsi/snic/snic_fwint.h
index c5f9e19..2a045a5 100644
--- a/drivers/scsi/snic/snic_fwint.h
++
On Tue, 17 May 2016, Kalle Valo wrote:
> Julia Lawall writes:
>
> > firmare -> firmware
> >
> > ---
> >
> > drivers/media/dvb-frontends/mn88473.c |2 +-
> > drivers/net/wireless/ath/ath6kl/core.h |2 +-
> > drivers/net/wir
From: Julia Lawall
Adjust code alignment so that each statement is lined up with its neighbor.
In the second case, it could be desirable to put the call to
lpfc_destroy_vport_work_array under the if. The call, is, however, safe
in case vports is NULL, so the patch just adjusts the indentation
From: Julia Lawall
Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.
A debugging statement in the error-handling code is removed as well, as it
doesn't seem to give any more information than devm_ioremap_res
devm_ioremap_resource often uses the result of a call to
platform_get_resource as its last argument. devm_ioremap_resource does
appropriate error handling on this argument, so error handling can be
removed from the call site. To make the connection between the call to
platform_get_resource and th
On Sat, 7 Feb 2015, Dan Carpenter wrote:
> On Fri, Feb 06, 2015 at 11:15:13PM +0100, SF Markus Elfring wrote:
> > diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> > index 2a00fd3..a7ca479 100644
> > --- a/drivers/scsi/qla4xxx/ql4_os.c
> > +++ b/drivers/scsi/qla4xxx/ql4_
From: Julia Lawall
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@r@
type T;
identifier f;
@@
static T f (...) { ... }
@@
identifier r.f;
declarer name EXPORT_SYMBOL;
@@
-EXPORT_SYMBOL(f);
//
Signed-off-by: Julia Lawall
---
drivers/scsi
These patches remove EXPORT_SYMBOL or EXPORT_SYMBOL_GPL declarations on
static functions.
This was done using the following semantic patch:
(http://coccinelle.lip6.fr/)
//
@r@
type T;
identifier f;
@@
static T f (...) { ... }
@@
identifier r.f;
declarer name EXPORT_SYMBOL;
@@
-EXPORT_SYMBOL(f
From: Julia Lawall
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@r@
type T;
identifier f;
@@
static T f (...) { ... }
@@
identifier r.f;
declarer name EXPORT_SYMBOL;
@@
-EXPORT_SYMBOL(f);
//
Signed-off-by: Julia Lawall
---
drivers/target
amp;ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
//
This patch also changes the subsequent dev_err call to use err rather
than recomputing PTR_ERR(hba->devfreq). The format of the error value
is changed from %ld to %d to reflect the type or err.
Signed-off-by: Ju
The complate semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@ok exists@
identifier f,ret,i;
expression e;
constant c;
@@
// identify a function that returns a negative return value at least once.
f(...) {
... when any
(
return -c@i;
|
ret = -c@i;
... when !
From: Julia Lawall
Delete successive tests to the same location. The code tested the result
of a previous allocation, that itself was already tested. It is changed to
test the result of the most recent allocation.
A simplified version of the semantic match that finds this problem is as
From: Julia Lawall
Delete successive tests to the same location. The current value of ln has
been tested already, and is clearly not NULL, given the enclosing if
condition. Furthermore, the result of csio_lnode_alloc is currently
ignored.
A simplified version of the semantic match that finds
Looks suspicious. Please check.
julia
On Tue, 8 Dec 2015, kbuild test robot wrote:
> CC: kbuild-...@01.org
> In-Reply-To: <1449535747-2850-14-git-send-email-himanshu.madh...@qlogic.com>
> TO: Himanshu Madhani
> CC: target-de...@vger.kernel.org, n...@linux-iscsi.org
> CC: giridhar.malav...@qlog
On Wed, 9 Dec 2015, Dan Carpenter wrote:
> We should add a tag to indicate that we are sending a patch for a crappy
> driver.
>
> IMHO-this-driver-is-garbage: Your Name
>
> If it got 10 votes of no confidence it would be moved to staging and
> then deleted.
Forgive my ignorance, but what is th
On Sat, 12 Dec 2015, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Sat, 12 Dec 2015 13:44:06 +0100
>
> The variable "pl" was declared and immediately assigned a return value
> from a function call in a separate statement.
>
> * Let us express the desired variable initialisation direct
Constify never-modified pci_error_handlers structures.
---
drivers/crypto/qat/qat_common/adf_aer.c |2 +-
drivers/misc/genwqe/card_base.c |2 +-
drivers/net/ethernet/cavium/liquidio/lio_main.c |2 +-
drivers/net/ethernet/sfc/efx.c |2 +-
d
This pci_error_handlers structure is never modified, like all the other
pci_error_handlers structures, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
There are no dependencies between these patches.
drivers/scsi/be2iscsi/be_main.c |2 +-
1 file
This pci_error_handlers structure is never modified, like all the other
pci_error_handlers structures, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
There are no dependencies between these patches.
drivers/scsi/mpt3sas/mpt3sas_scsih.c |2 +-
1
This pci_error_handlers structure is never modified, like all the other
pci_error_handlers structures, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
There are no dependencies between these patches.
drivers/scsi/bfa/bfad.c |2 +-
1 file changed
This pci_error_handlers structure is never modified, like all the other
pci_error_handlers structures, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
There are no dependencies between these patches.
drivers/scsi/csiostor/csio_init.c |2 +-
1
The mpt_pci_driver structures are never modified, so declare them as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/message/fusion/mptbase.c |8 +---
drivers/message/fusion/mptbase.h |3 ++-
drivers/message/fusion/mptctl.c |2 +-
drivers
From: Julia Lawall <[EMAIL PROTECTED]>
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/cocc
From: Julia Lawall <[EMAIL PROTECTED]>
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/cocc
From: Julia Lawall <[EMAIL PROTECTED]>
In the patch cc154ac64aa8d3396b187f64cef01ce67f433324, Al Viro observed
that the proper way to compute the distance between two structure fields is
to use offsetof() or a cast to a pointer to character. The same change can
be applied to a few more
From: Julia Lawall
Set the return variable to an error code as done elsewhere in the function.
Additionally, in each case there is no need to initialize ret to 0, since
its value is immediately overwritten.
A simplified version of the semantic match that finds the first problem is as
follows
From: Julia Lawall
Set the return variable to an error code as done elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when !=
From: Julia Lawall
Set the return variable to an error code as done elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when !=
From: Julia Lawall
Set the return variable to an error code as done elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when !=
These patches fix cases where the return variable is not set to an error
code in an error case.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sometimes a local variable is used as a return value in a case where the
return value is always 0. The result is more apparent if this variable is
just replaced by 0. This is done by the following semantic patch, although
some cleanups may be needed. (http://coccinelle.lip6.fr/)
//
@r exists@
l
From: Julia Lawall
Delete unnecessary use of a local variable to immediately return 0.
A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)
//
@r exists@
local idexpression ret;
expression e;
position p;
@@
-ret = 0;
... when != ret
On Mon, 19 May 2014, Dan Carpenter wrote:
> On Mon, May 19, 2014 at 04:07:52PM +, Saurav Kashyap wrote:
> > Hi Julia,
> >
> > Status is already set to 0 at the beginning of the function, I think
> > we should just "return status" here to be consistent with the rest of
> > the function.
>
> "
Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may
return a larger number than the maximum position argument if that position
is not a multiple of BITS_PER_LONG.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vge
From: Julia Lawall
Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may
return a larger number than the maximum position argument if that position
is not a multiple of BITS_PER_LONG.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr
On Wed, 4 Jun 2014, Geert Uytterhoeven wrote:
> Hi Julia,
>
> On Wed, Jun 4, 2014 at 11:07 AM, Julia Lawall wrote:
> > Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may
> > return a larger number than the maximum position argument if that position
On Wed, 4 Jun 2014, David Laight wrote:
> From: Julia Lawall
> > On Wed, 4 Jun 2014, Geert Uytterhoeven wrote:
> >
> > > Hi Julia,
> > >
> > > On Wed, Jun 4, 2014 at 11:07 AM, Julia Lawall
> > > wrote:
> > > > Find_firs
On Wed, 4 Jun 2014, Geert Uytterhoeven wrote:
> Hi Julia,
>
> On Wed, Jun 4, 2014 at 11:52 AM, Julia Lawall wrote:
> >> Maybe the documented return code should be changed to allow for the
> >> existing behaviour.
> >
> > Sorry, I'm not sure to under
On Wed, 4 Jun 2014, Geert Uytterhoeven wrote:
> Hi Julia,
>
> On Wed, Jun 4, 2014 at 1:00 PM, Julia Lawall wrote:
> > OK, thanks. I was only looking at the C code.
> >
> > But the C code contains a loop that is followed by:
> >
> > if (!
On Wed, 4 Jun 2014, scame...@beardog.cce.hp.com wrote:
> On Wed, Jun 04, 2014 at 11:07:56AM +0200, Julia Lawall wrote:
> > From: Julia Lawall
> >
> > Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may
> > return a larger number than the maximu
;
> > expression x,e1,e2,e3;
> > identifier alloc;
> > @@
> >
> > ret = 0
> > ... when != ret = e1
> > *x = alloc(...)
> > ... when != ret = e2
> > if (x == NULL) { ... when != ret = e3
> > return ret;
> > }
> > //
> >
On Fri, 4 Jul 2014, Julia Lawall wrote:
>
>
> On Fri, 4 Jul 2014, Elliott, Robert (Server Storage) wrote:
>
> >
> >
> > > -Original Message-
> > > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi-
> > > ow...@vger.kernel.o
Drop LIST_HEAD where the variable it declares is never used.
---
drivers/dma/at_hdmac.c|5 -
drivers/dma/dw/core.c |1 -
drivers/dma/pl330.c |1 -
drivers/dma/sa11x0-dma.c
t;)
Signed-off-by: Julia Lawall
---
Successfully 0-day tested on 151 configurations.
drivers/scsi/lpfc/lpfc_sli.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 30734caf77e1..13fe9d3331b9 100644
--- a/drivers/scsi/lpfc/lpfc_s
le.lip6.fr/)
//
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
//
Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery")
Signed-off-by: Julia Lawall
---
Successfully 0-day tested on 151 configurations.
drivers/scsi/qla2xxx/qla_init.c |1 -
1 file changed, 1 deletion(-)
: 01649561a8b4b ("scsi: lpfc: NVME Initiator: bind to nvme_fc api")
Signed-off-by: Julia Lawall
---
Successfully 0-day tested on 151 configurations.
drivers/scsi/lpfc/lpfc_nvme.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nv
ows:
(http://coccinelle.lip6.fr/)
//
@@
identifier x;
@@
- LIST_HEAD(x);
... when != x
//
Fixes: 8a9d2e8003040 ("[SCSI] lpfc 8.3.31: Correct handling of SLI4-port XRI
resource-provisioning profile change")
Signed-off-by: Julia Lawall
---
Successfully 0-day tested on 151 configurat
ted files.
julia
>
> On 23/12/2018, Julia Lawall wrote:
> > Drop LIST_HEAD where the variable it declares is never used.
> >
> > ---
> >
> > drivers/dma/at_hdmac.c|5 -
> > drivers/dma/dw/core.c
On Fri, 28 Dec 2018, Darrick J. Wong wrote:
> On Thu, Dec 27, 2018 at 04:40:55PM +0300, Dan Carpenter wrote:
> > On Tue, Dec 25, 2018 at 11:12:20PM +0100, Tom Psyborg wrote:
> > > there was discussion about this just some days ago. CC 4-5 lists is
> > > more than enough
> > >
> >
> > I don't kn
These patches fix cases where a subsequent statement is aligned
with the right hand side of an assignment rather than the left
hand side. This was done using the following semantic match
(http://coccinelle.lip6.fr/). It has a lot of false positives,
because Coccinelle doesn't record the differenc
Delete tab aligning a statement with the right hand side of a
preceding assignment rather than the left hand side.
Found with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/scsi/pm8001/pm8001_sas.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
It looks like an unlock is missing before line 1000.
Is it correct that the same test is done on lines 994 and 999?
julia
-- Forwarded message --
Date: Wed, 13 Feb 2019 16:26:08 +0800
From: kbuild test robot
To: kbu...@01.org
Cc: Julia Lawall
Subject: Re: [PATCH 07/12] qla2xxx
ned-off-by: Julia Lawall
---
url:
https://github.com/0day-ci/linux/commits/Saurav-Kashyap/qedf-Misc-fixes-for-the-driver/20190305-205913
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
:: branch date: 8 hours ago
:: commit date: 8 hours ago
Please take the
On Tue, 12 Mar 2019, Milan P. Gandhi wrote:
The patch should have a log message. For example, you could point out
where the type is so the reader doesn't have to search for it.
The subject line should also give a hint about what file is affected, so
that the right person will pay attention to
On Wed, 20 Dec 2017, Joe Perches wrote:
> On Wed, 2017-12-20 at 10:59 +0100, Greg Kroah-Hartman wrote:
> > > > Why you didn't send that patch to the sysfs maintainer is a bit odd...
> > > > :)
> > >
> > > So here's an opportunity for you:
> > >
> > > The sysfs maintainer hasn't added include/l
hpsa_show_dev_msg prints other information and a newline after the
message string, so the message string does not need to include a
newline explicitly. Done using Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/scsi/hpsa.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Drop newline at the end of a message string when the printing function adds
a newline.
The complete semantic patch that detects this issue is as shown below
(http://coccinelle.lip6.fr/). It works in two phases - the first phase
counts how many uses of a function involve a newline and how many don
On Tue, 2 Jan 2018, Bob Peterson wrote:
> - Original Message -
> | Drop newline at the end of a message string when the printing function adds
> | a newline.
>
> Hi Julia,
>
> NACK.
>
> As much as it's a pain when searching the source code for output strings,
> this patch set goes agains
On Tue, 2 Jan 2018, Bob Peterson wrote:
> - Original Message -
> | - Original Message -
> | | Drop newline at the end of a message string when the printing function
> adds
> | | a newline.
> |
> | Hi Julia,
> |
> | NACK.
> |
> | As much as it's a pain when searching the source c
On Tue, 2 Jan 2018, Bart Van Assche wrote:
> On Tue, 2018-01-02 at 15:00 +0100, Julia Lawall wrote:
> > On Tue, 2 Jan 2018, Bob Peterson wrote:
> > > - Original Message -
> > > > - Original Message -
> > > >
> > > Still, the G
From: kbuild test robot
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Fixes: 26e2aa63d568 ("ZEN: Add VHBA driver")
Signed-off-by: kbuild test robot
Signed-off-by: Julia Lawall
---
There was als
On Fri, 2 Jun 2017, Milan P. Gandhi wrote:
> On 06/01/2017 08:32 PM, Dan Carpenter wrote:
> > On Thu, Jun 01, 2017 at 05:41:06PM +0530, Milan P. Gandhi wrote:
> >> Simplify the check for return code of fcoe_if_init routine
> >> in fcoe_init function such that we could eliminate need for
> >> ext
On Fri, 2 Jun 2017, Milan P. Gandhi wrote:
> Simplify the check for return code of fcoe_if_init routine
> in fcoe_init function such that we could eliminate need for
> extra 'out_free' label and duplicate mutex_unlock statement.
>
> Signed-off-by: Milan P. Gandhi
> ---
> drivers/scsi/fcoe/fcoe
On Fri, 2 Jun 2017, walter harms wrote:
>
>
> Am 02.06.2017 14:39, schrieb Milan P. Gandhi:
> > Simplify the check for return code of fcoe_if_init routine
> > in fcoe_init function such that we could eliminate need for
> > extra 'out_free' label and duplicate mutex_unlock statement.
> >
> > Sign
On Mon, 5 Jun 2017, Milan P. Gandhi wrote:
> Remove the white spaces in do/while loop used for checking fcoe
> debug logging
Is it converting spaces to tabs? If so, saying that would be clearer.
julia
>
> Signed-off-by: Milan P. Gandhi
> ---
> drivers/scsi/fcoe/fcoe.h | 2 +-
> 1 file chan
Please check on whether an unlock is neeed before line 1965.
julia
-- Forwarded message --
Date: Fri, 23 Jun 2017 15:23:00 +0800
From: kbuild test robot
To: kbu...@01.org
Cc: Julia Lawall
Subject: Re: [PATCH] qla2xxx: Protect access to qpair members with
qpair->qp_lock
Hello,
It looks like the goto on line 2374 could result in the io_lock not being
released.
julia
-- Forwarded message --
Date: Sat, 24 Jun 2017 13:27:41 +0800
From: kbuild test robot
To: kbu...@01.org
Cc: Julia Lawall
Subject: Re: [PATCH 34/35] scsi: Move
These pci_error_handlers structures are only stored in the err_handler
field of a pci_driver structure, and this field is declared as const. Thus
the pci_error_handlers structures can be const too.
Done with the help of Coccinelle.
---
drivers/misc/genwqe/card_base.c |2 +-
drivers/sc
These pci_error_handlers structures are only stored in the err_handler
field of a pci_driver structure, and this field is declared as const. Thus
the pci_error_handlers structures can be const too.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/scsi/bfa/bfad.c
These pci_error_handlers structures are only stored in the err_handler
field of a pci_driver structure, and this field is declared as const. Thus
the pci_error_handlers structures can be const too.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/scsi/csiostor
These pci_error_handlers structures are only stored in the err_handler
field of a pci_driver structure, and this field is declared as const. Thus
the pci_error_handlers structures can be const too.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/scsi/mpt3sas
These pci_error_handlers structures are only stored in the err_handler
field of a pci_driver structure, and this field is declared as const. Thus
the pci_error_handlers structures can be const too.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/scsi/be2iscsi
These pci_error_handlers structures are only stored in the err_handler
field of a pci_driver structure, and this field is declared as const. Thus
the pci_error_handlers structures can be const too.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/scsi/aacraid/linit.c
On Sat, 12 Aug 2017, Christoph Hellwig wrote:
> On Sat, Aug 12, 2017 at 07:44:28AM +0200, Julia Lawall wrote:
> > These pci_error_handlers structures are only stored in the err_handler
> > field of a pci_driver structure, and this field is declared as const. Thus
> > t
On Sat, 12 Aug 2017, Christoph Hellwig wrote:
> On Sat, Aug 12, 2017 at 09:52:28AM +0200, Julia Lawall wrote:
> > OK, sure. So to be precise, you want the fields error_detected,
> > mmio_enabled, etc to be added as new fields to the pci_driver structure?
>
> Yes.
>
>
Another issue arises in the files drivers/infiniband/hw/hfi1/pcie.c and
drivers/infiniband/hw/qib/qib_pcie.c, where the pci_error_handlers
structure is defined in one file and used in another file. The structure
definition references various functions that are static in the same file.
Should I try
From: Julia Lawall
If the NULL test is necessary, the initialization involving a dereference of
the tested value should be moved after the NULL test.
The sematic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@@
type T;
expression E;
identifier i,fld;
statement S
From: Julia Lawall
Use WARN rather than printk followed by WARN_ON(1), for conciseness.
A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)
//
@@
expression list es;
@@
-printk(
+WARN(1,
es);
-WARN_ON(1);
//
Signed-off-by
From: Julia Lawall
Use WARN rather than printk followed by WARN_ON(1), for conciseness.
If (count) is also merged into WARN, for further conciseness.
A simplified version of the semantic patch that makes part of this
transformation is as follows: (http://coccinelle.lip6.fr/)
//
@@
expression
From: Julia Lawall
Just use WARN_ON rather than an if containing only WARN_ON(1).
A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)
//
@@
expression e;
@@
- if (e) WARN_ON(1);
+ WARN_ON(e);
//
Signed-off-by: Julia Lawall
From: Julia Lawall
Just use WARN_ON rather than an if containing only WARN_ON(1).
A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)
//
@@
expression e;
@@
- if (e) WARN_ON(1);
+ WARN_ON(e);
//
Signed-off-by: Julia Lawall
From: Julia Lawall
Just use WARN_ON rather than an if containing only WARN_ON(1).
A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)
//
@@
expression e;
@@
- if (e) WARN_ON(1);
+ WARN_ON(e);
//
Signed-off-by: Julia Lawall
It looks like these patches were not a good idea, because in each case the
printk provides an error level, and WARN then provides another one.
Sorry for the noise.
julia
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.or
The complate semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@ok exists@
identifier f,ret,i;
expression e;
constant c;
@@
// identify a function that returns a negative return value at least once.
f(...) {
... when any
(
return -c@i;
|
ret = -c@i;
... when !
From: Julia Lawall
Return a negative error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... when !=
From: Julia Lawall
Delete a local structure that is only used to be initialized by memset.
A semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
identifier x,i;
@@
{
... when any
-struct i x;
<+... when != x
- memset(&x,...);
...+>
}
//
Sig
Remove an array or structure that only serves as the first argument to
memset. The complete semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
identifier x;
type T;
@@
{
... when any
-T x[...];
<+... when != x
- memset(x,...);
...+>
}
@@
identifier x,i;
@@
From: Julia Lawall
Delete a local array that is only used to be initialized by memset.
A semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
identifier x;
type T;
@@
{
... when any
-T x[...];
<+... when != x
- memset(x,...);
...+>
}
//
Signed-
1 - 100 of 126 matches
Mail list logo