We can use for_each_set_bit() to slightly simplify the code.
Signed-off-by: Andy Shevchenko
---
- fix title by adding "fs" (Doug)
drivers/scsi/scsi_debugfs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debug
We can use for_each_set_bit() to slightly simplify the code.
Signed-off-by: Andy Shevchenko
---
drivers/scsi/scsi_debugfs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c
index c5a8756384bc..c19ea7ab54cb 100644
s ",
> e->items[i]);
> + }
The problem here that the user will have no clue where the gap is happened, to
solve this we need either bitmap of array, where set bits shows defined items,
or use comma-separated list of values. The latter would need another node since
we don't break user space.
--
With Best Regards,
Andy Shevchenko
Switch to bitmap_zalloc() to show clearly what we are allocating.
Besides that it returns pointer of bitmap type instead of opaque void *.
Signed-off-by: Andy Shevchenko
---
drivers/target/target_core_user.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers
On Tue, Dec 4, 2018 at 11:26 PM Tony Battersby wrote:
>
> On 12/4/18 3:30 PM, Andy Shevchenko wrote:
> > On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox wrote:
> >> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> >>> Also, Andy had issues with the
me ago.
If I _was_ in Cc list and didn't comment, I'm fine with it.
--
With Best Regards,
Andy Shevchenko
ically get picked up through kernel janitors,
> or maybe an akpm linux-next patch queue. In fact, I'm not even sure if
> there is a designated person I would be passing updates to, I've sent
> patches to akpm, viro, hellwig, linus, and gregkh at various times.
% scripts/get_maintainer.pl -f include/linux/coda.h
Jan Harkes (maintainer:CODA FILE SYSTEM)
c...@cs.cmu.edu (maintainer:CODA FILE SYSTEM)
codal...@coda.cs.cmu.edu (open list:CODA FILE SYSTEM)
linux-ker...@vger.kernel.org (open list)
Aren't you a maintainer?
--
With Best Regards,
Andy Shevchenko
On Wed, Nov 21, 2018 at 8:10 PM Jan Harkes wrote:
>
> On Wed, Nov 21, 2018 at 06:41:13PM +0200, Andy Shevchenko wrote:
> > I'm not sure how you managed to miss people in this list (perhaps by
> > default you have suppress all Cc in your Git configuration), but I
>
use of
> > this u_quad_t type is not defined when using bare-metal toolchain and
> > codafs build fails. This patch fixes it by defining u_quad_t type
> > unconditionally.
> >
> > Cc: Jan Harkes
> > Cc: Christoph Hellwig
> > Cc: Andy Shevchenko
I'm no
looking at the code structure; I
> have no idea how the mpt3sas hardware or the SCSI mid-layer work, so
> you're on your own there :)
>
> Reviewed-by: Bjorn Helgaas
>
> Andy also gave his reviewed-by on the v6 series, so I cc'd him here.
> I think it's good practice to specifically cc anybody who has
> commented on previous versions of your patch set.
Right, thanks!
With the same caveat as Bjorn posted I give my
Reviewed-by: Andy Shevchenko
to v7.
--
With Best Regards,
Andy Shevchenko
With Best Regards,
Andy Shevchenko
tests, we ll post Hot-Plug Surprise removal patches.
>
FWIW,
Reviewed-by: Andy Shevchenko
P.S. We are in the middle of merge window, so, this week is a little
chance anyone will look at it.
> Thanks,
> Suganath Prabu
> On Tue, Oct 23, 2018 at 3:51 PM Suganath Prabu
> wrote:
>
inux/coda.h
> > @@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without
> > encumbrance.
> > #ifndef _CODA_HEADER_
> > #define _CODA_HEADER_
> >
> > -#if defined(__linux__)
> > typedef unsigned long long u_quad_t;
> > -#endif
> > +
> > #include
> > #endif
> > --
> > 2.19.1
> >
--
With Best Regards,
Andy Shevchenko
On Thu, Oct 18, 2018 at 10:11 AM Suganath Prabu Subramani
wrote:
>
>
>
> On Wed, Oct 17, 2018 at 2:02 PM Andy Shevchenko
> wrote:
>>
>> On Wed, Oct 17, 2018 at 8:59 AM Suganath Prabu
>> wrote:
>> >
>> > This is to fix Sync cache and start sto
On Thu, Oct 18, 2018 at 10:10 AM Suganath Prabu Subramani
wrote:
> On Wed, Oct 17, 2018 at 1:49 PM Andy Shevchenko
> wrote:
>> On Wed, Oct 17, 2018 at 11:17 AM Andy Shevchenko
>> wrote:
>> > I understand this is part of existing code, but can you consider to
>&
}
> + }
> +
> + return true;
Wouldn't be the same as
if (!ioc->remove_host || ioc->hba_mpi_version_belonged == MPI2_VERSION)
return !ioc->remove_host;
switch (scmd->cmnd[0]) {
case SYNCHRONIZE_CACHE:
case START_STOP:
return true;
default:
return false;
}
?
--
With Best Regards,
Andy Shevchenko
e == 0)) {
No need to have parens.
--
With Best Regards,
Andy Shevchenko
On Wed, Oct 17, 2018 at 11:17 AM Andy Shevchenko
wrote:
>
> On Wed, Oct 17, 2018 at 8:59 AM Suganath Prabu
> wrote:
> >
> > No functional changes. This section of code
> > "wait for IOC to be operational" is used in many places
> > across the dri
OUNT);
One line?
> + rc = mpt3sas_wait_for_ioc_to_operational(ioc,
> + IOC_OPERATIONAL_WAIT_COUNT);
Ditto.
> + rc = mpt3sas_wait_for_ioc_to_operational(ioc,
> + IOC_OPERATIONAL_WAIT_COUNT);
Ditto.
> + rc = mpt3sas_wait_for_ioc_to_operational(ioc,
> + IOC_OPERATIONAL_WAIT_COUNT);
Ditto.
--
With Best Regards,
Andy Shevchenko
On Tue, Sep 25, 2018 at 1:29 PM Suganath Prabu Subramani
wrote:
>
> On Tue, Sep 25, 2018 at 3:22 PM Andy Shevchenko
> wrote:
> >
> > On Tue, Sep 25, 2018 at 12:46 PM Suganath Prabu Subramani
> > wrote:
> >
> > > > > + pr_err(MPT3SAS_
This should be just one line.
> Above line crosses over 80 characters, so it is in two lines.
For years there is no such requirement for string literals.
Please, don't split string literals in ugly way like this.
--
With Best Regards,
Andy Shevchenko
pr_err(MPT3SAS_FMT
> + "%s: pci error recovery reset or"
> + " pci device unplug occurred\n",
This should be just one line.
> + ioc->name, __func__);
> + return;
> + }
--
With Best Regards,
Andy Shevchenko
/scsi/mpt3sas/mpt3sas_ctl.c | 26 +
> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 189
> +++
> drivers/scsi/mpt3sas/mpt3sas_transport.c | 82 +++---
> 6 files changed, 298 insertions(+), 177 deletions(-)
>
> --
> 1.8.3.1
>
--
With Best Regards,
Andy Shevchenko
| 17 ++-
> drivers/scsi/mpt3sas/mpt3sas_config.c| 32 +---
> drivers/scsi/mpt3sas/mpt3sas_ctl.c | 26 +---
> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 188 ---
> drivers/scsi/mpt3sas/mpt3sas_transport.c | 82 +++---
> 6 files changed, 414 insertions(+), 179 deletions(-)
>
> --
> 1.8.3.1
>
--
With Best Regards,
Andy Shevchenko
ows this kind of style.
--
With Best Regards,
Andy Shevchenko
On Fri, 2018-08-03 at 16:04 +0530, Sreekanth Reddy wrote:
> On Fri, Aug 3, 2018 at 3:07 PM, Andy Shevchenko
> wrote:
> > On Thu, 2018-08-02 at 16:16 -0400, Martin K. Petersen wrote:
> > > Andy,
> > >
> > > Please review the changes Sreekanth made to addres
s patch I am correcting it by adding these APIs back
> > before accessing I/O memory.
> >
> > v1: Changelog:
> > Replaced writeq API with __raw_writeq() & mmiowb() APIs.
>
>
--
Andy Shevchenko
Intel Finland Oy
On Thu, Jul 26, 2018 at 2:25 PM, Sreekanth Reddy
wrote:
> On Wed, Jul 25, 2018 at 8:32 PM, Andy Shevchenko
> wrote:
>> On Wed, Jul 25, 2018 at 12:42 PM, Sreekanth Reddy
>> wrote:
>>> Swap the I/O memory read value back to cpu endianness before storing it
>>
32)(request[i]), &ioc->chip->Doorbell);
> + writel(cpu_to_le32(request[i]), &ioc->chip->Doorbell);
This kind of endianess play (including above) should make sparse unhappy.
Did you run it with
C=1 CF=-D__CHECK_ENDIAN__
?
--
With Best Regards,
Andy Shevchenko
ng the non-raw readX/writeX it should be cpu endian
> internally which cf6bf9710c upsets.
And we definitely won't see the constructions like
writeq(cpu_to_le64()) in the code, because it's weird.
If I get it correctly it's equivalent to __raw_writeq().
--
With Best Regards,
Andy Shevchenko
er
sparse warnings.
As an example:
> - writeq(b, addr);
> + writeq(cpu_to_le64(b), addr);
/* Not all architectures has a writeq() equivalent to the below (sparc64) */
__raw_writeq(...)
--
With Best Regards,
Andy Shevchenko
p->write_prot = ((data.device_specific & 0x80) != 0) ||
> + disk_ro;
Perhaps
sdkp->write_prot = (data.device_specific & 0x80) || disk_ro;
will save a line.
--
With Best Regards,
Andy Shevchenko
On Fri, Feb 23, 2018 at 7:09 PM, David Laight wrote:
> From: Andy Shevchenko
>> Sent: 23 February 2018 16:51
>> On Fri, Feb 23, 2018 at 6:41 PM, David Laight
>> wrote:
>> The side-effect I referred previously is about tails, i.e. unaligned
>> bytes are trans
On Fri, Feb 23, 2018 at 6:51 PM, Andy Shevchenko
wrote:
> On Fri, Feb 23, 2018 at 6:41 PM, David Laight wrote:
>> From: Arnd Bergmann
>>> Sent: 23 February 2018 15:37
>>>
>>> 32-bit architectures generally cannot use writeq(), so we now get a b
e transfers.
> So instead of the 8 byte transfers (on 64 bit) you get single bytes.
> This won't be what is intended!
> memcpy_toio() should probably use 'rep movsd' for the bulk of the transfer.
Maybe I'm wrong but it uses movsq on 64-bit and movsl on 32-bit.
The side-effect I referred previously is about tails, i.e. unaligned
bytes are transferred in portions
like
7 on 64-bit will be 4 + 2 + 1,
5 = 4 + 1
etc
Similar way on 32-bit.
--
With Best Regards,
Andy Shevchenko
On Fri, Feb 23, 2018 at 5:59 PM, Andy Shevchenko
wrote:
> On Fri, Feb 23, 2018 at 5:36 PM, Arnd Bergmann wrote:
> IIRC memcpy_toio() doesn't increment the destination address.
>
> lo_hi or hi_lo helpers sound better.
Ah, sorry, I messed up with writesl() / etc.
memcpy_toio()
phba->cfg_enable_dpp)
> /* write to DPP aperture taking advatage of Combined Writes */
> - tmp = (uint8_t *)wqe;
> - for (i = 0; i < q->entry_size; i += sizeof(uint64_t))
> - writeq(*((uint64_t *)(tmp + i)), q->
On Wed, 2018-02-14 at 11:40 -0800, James Bottomley wrote:
> On Wed, 2018-02-14 at 20:10 +0200, Andy Shevchenko wrote:
> > Since we have a writeq() for 32-bit architectures as provided by IO
> > non-atomic helpers, there is no need to open code it.
> >
> > Moreover
__le64
Fixing this by replacing custom writeq() with one provided by
io-64-nonatomic-lo-hi.h header.
Reported-by: kbuild test robot
Signed-off-by: Andy Shevchenko
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a
On Fri, Jan 12, 2018 at 5:09 PM, Bart Van Assche wrote:
> On Fri, 2018-01-12 at 15:45 +0200, Andy Shevchenko wrote:
>> On Fri, Jan 12, 2018 at 1:46 PM, Wang wrote:
>> This one is false positive.
>> > + strlcpy (karg.name, ioc->name, MPT_MAX_NAME);
>>
Numbers up to 100 snprintf() prints without using a division.
Besides that the code looks more readable.
Signed-off-by: Andy Shevchenko
---
drivers/message/fusion/mptctl.c | 25 +++--
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/drivers/message/fusion
> pdata->BoardTracerNumber, 24);
> - karg.serial_number[24-1]='\0';
> + strlcpy(karg.serial_number,
> +
> pdata->BoardTracerNumber, 24);
> }
...and here you don't need to touch anything.
--
With Best Regards,
Andy Shevchenko
gt; +static DEVICE_ATTR_RW(wake_up_modem);
> +static DEVICE_ATTR_RW(wake_up_lan);
> +static DEVICE_ATTR_RW(wake_up_wlan);
> +static DEVICE_ATTR_RW(wake_up_key);
> +static DEVICE_ATTR_RW(wake_up_mouse);
Acked-by: Andy Shevchenko
for PDx86 bits.
Have to say that while it doesn't change
The function sas_parse_addr() could be easily substituted by hex2bin() which is
in kernel library code.
Cc: Christoph Hellwig
Signed-off-by: Andy Shevchenko
---
drivers/scsi/libsas/sas_scsi_host.c | 20
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers
Using this extension reduces the object size.
Signed-off-by: Andy Shevchenko
---
drivers/scsi/hpsa.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index b0aa5dc1d54c..4c018b653f18 100644
--- a/drivers/scsi/hpsa.c
as a timer interrupt.
> */
> static void tpd_led_update(struct work_struct *work)
> - {
> +{
> struct eeepc_laptop *eeepc;
>
> eeepc = container_of(work, struct eeepc_laptop, tpd_led_work);
> diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-
On Fri, Jul 14, 2017 at 10:37 PM, Arnd Bergmann wrote:
> On Fri, Jul 14, 2017 at 9:18 PM, Andy Shevchenko
> wrote:
>> On Fri, Jul 14, 2017 at 3:07 PM, Arnd Bergmann wrote:
>>> gcc points out a possible format string overflow for a large value of
>>> '
.c
> +++ b/drivers/platform/x86/alienware-wmi.c
> @@ -421,7 +421,7 @@ static DEVICE_ATTR(lighting_control_state, 0644,
> show_control_state,
> static int alienware_zone_init(struct platform_device *dev)
> {
> int i;
> - char buffer[10];
> + char buffer[13];
> char *name;
>
> if (interface == WMAX) {
> --
> 2.9.0
>
--
With Best Regards,
Andy Shevchenko
acpi_gpiochip_request_interrupt(struct acpi_resource *ares,
> char ev_name[5];
> sprintf(ev_name, "_%c%02X",
> agpio->triggering == ACPI_EDGE_SENSITIVE ?
> 'E' : 'L',
> - pin);
> + (u8)pin);
> if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name,
> &evt_handle)))
> handler = acpi_gpio_irq_handler;
> }
--
Andy Shevchenko
Intel Finland Oy
In kernel we have defined specifier (%*ph[C]) to dump small buffers in a hex
format. Replace custom approach by a generic one.
Cc: Jon Mason
Signed-off-by: Andy Shevchenko
---
drivers/scsi/scsi_transport_srp.c | 11 +--
drivers/scsi/sd.c | 4 +---
2 files changed, 2
From: Andy Shevchenko
We have table of the HEX characters in the kernel. Replace custom by a generic
one.
Cc: Adaptec OEM Raid Solutions
Signed-off-by: Andy Shevchenko
---
drivers/scsi/ips.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/ips.c
For small buffers we may use %*ph[N] specifier, for the bigger blocks
print_hex_dump() call.
Cc: Don Brace
Cc: esc.storage...@microsemi.com
Signed-off-by: Andy Shevchenko
---
drivers/block/cciss_scsi.c | 72 +++---
1 file changed, 10 insertions(+), 62
From: Oleksandr Khoshaba
In the kernel we have nice specifier to print MAC by given pointer to the
address in a binary form.
Signed-off-by: Oleksandr Khoshaba
Acked-by: Vikas Chaudhary
Cc: qlogic-storage-upstr...@qlogic.com
Signed-off-by: Andy Shevchenko
---
drivers/scsi/qla4xxx/ql4_mbx.c
Just collection of clean ups against SCSI drivers. Some of them were Acked
quite long ago, but didn't make upstream yet.
Andy Shevchenko (5):
scsi: fnic: use kernel's '%pM' format option to print MAC
fusion: print lan address via %pMR
[SCSI] ips: don't use cus
Instead of supplying each byte through stack let's use %pM specifier.
Cc: Hiral Patel
Cc: Suma Ramars
Acked-by: Tom Tucker
Signed-off-by: Andy Shevchenko
---
drivers/scsi/fnic/vnic_dev.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi
LAN MAC addresses can be printed directly using %pMR specifier.
Cc: Sathya Prakash
Cc: Chaitra P B
Cc: Suganath Prabu Subramani
Signed-off-by: Andy Shevchenko
---
drivers/message/fusion/mptbase.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers
On Fri, 2016-05-06 at 19:23 +0300, Andy Shevchenko wrote:
> This is a set of independent clean ups that didn't land upstream for
> ages (some
> are dated 2010!). As agreed with Martin at some point I resend
> them.
>
> I have more, but the rest is not yet ready for subm
md
> (def=0x)");
> @@ -4787,6 +4821,12 @@ static ssize_t strict_store(struct device_driver *ddp,
> const char *buf,
> }
> static DRIVER_ATTR_RW(strict);
>
> +static ssize_t uuid_ctl_show(struct device_driver *ddp, char *buf)
> +{
> + return scnprintf(buf, PAGE_
For small buffers we may use %*ph[N] specifier, for the bigger blocks
print_hex_dump() call.
Cc: Christoph Hellwig
Signed-off-by: Andy Shevchenko
---
drivers/block/cciss_scsi.c | 72 +++---
1 file changed, 10 insertions(+), 62 deletions(-)
diff --git a
In kernel we have defined specifier (%*ph[C]) to dump small buffers in a hex
format. Replace custom approach by a generic one.
Signed-off-by: Andy Shevchenko
---
drivers/scsi/scsi_transport_srp.c | 11 +--
drivers/scsi/sd.c | 4 +---
2 files changed, 2 insertions(+), 13
From: Andy Shevchenko
We have table of the HEX characters in the kernel. Replace custom by a generic
one.
Cc: Adaptec OEM Raid Solutions
Signed-off-by: Andy Shevchenko
---
drivers/scsi/ips.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/ips.c
This is a set of independent clean ups that didn't land upstream for ages (some
are dated 2010!). As agreed with Martin at some point I resend
them.
I have more, but the rest is not yet ready for submission.
Andy Shevchenko (3):
libsas: remove private hex2bin() implementation
scsi:
From: Oleksandr Khoshaba
In the kernel we have nice specifier to print MAC by given pointer to the
address in a binary form.
Signed-off-by: Oleksandr Khoshaba
Acked-by: Vikas Chaudhary
Cc: qlogic-storage-upstr...@qlogic.com
Signed-off-by: Andy Shevchenko
---
drivers/scsi/qla4xxx/ql4_mbx.c
LAN MAC addresses can be printed directly using %pMR specifier.
Cc: Sathya Prakash
Cc: mpt-fusionlinux@broadcom.com
Signed-off-by: Andy Shevchenko
---
drivers/message/fusion/mptbase.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/message/fusion
Instead of supplying each byte through stack let's use %pM specifier.
Cc: Hiral Patel
Cc: Suma Ramars
Cc: Brian Uchino
Signed-off-by: Andy Shevchenko
---
drivers/scsi/fnic/vnic_dev.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/fnic/vnic_de
The function sas_parse_addr() could be easily substituted by hex2bin() which is
in kernel library code.
Cc: Christoph Hellwig
Signed-off-by: Andy Shevchenko
---
drivers/scsi/libsas/sas_scsi_host.c | 22 ++
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a
IW:
Reviewed-by: Andy Shevchenko
>
> Signed-off-by: Leonid Moiseichuk
> ---
Missed changelog vfrom v1 to v2.
> drivers/scsi/mvsas/mv_init.c | 19 +--
> 1 file changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/drivers/scsi/mvsas/mv_init.c b/dri
int rc;
>
> - rc = ata_pci_device_do_resume(pdev);
> - if (rc)
> - return rc;
> -
> /* Apple BIOS helpfully mangles the registers on resume */
> if (is_mcp89_apple(pdev))
> ahci_mcp89_apple_enable(pdev);
> --
which was
> Rasmus> created for such short hexdumps.
>
> Applied to 4.5/scsi-queue.
How fast!
Martin, I have several patches on SCSI subsytem like this one. Some of
them didn't manage kernel (even having Ack!) for years already.
Is it okay if I collect them together and send a bu
On Thu, Nov 26, 2015 at 4:14 AM, Martin K. Petersen
wrote:
>>>>>> "Andy" == Andy Shevchenko writes:
>
> Andy,
>
> Andy> but can you pay a little attention to
> Andy> http://www.spinics.net/lists/linux-scsi/msg81778.html ? It seems
> Andy&g
From: Andy Shevchenko
Even for signed types we have to check for bigger positive value first.
Otherwise it will be never happened.
Acked-by: Douglas Gilbert
Signed-off-by: Andy Shevchenko
---
drivers/scsi/scsi_debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a
Martin, sorry for offtopic, but can you pay a little attention to
http://www.spinics.net/lists/linux-scsi/msg81778.html ? It seems it
wasn't applied.
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a me
, the matter is only to replace MULDIV() by mult_frac() which is
already in kernel.
--
With Best Regards,
Andy Shevchenko
--
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
/* N.B. User receives timeout as return value
> */
> --
> Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project
>
> --
> To unsubscribe from th
On Thu, Nov 5, 2015 at 9:31 PM, Andy Shevchenko
wrote:
> On Thu, Nov 5, 2015 at 8:32 PM, Sinan Kaya wrote:
>> On 11/5/2015 1:07 PM, Andy Shevchenko wrote:
>
>> Let's try again.
>>
>> static inline u64 mult_frac64(u64 x, u32 numer, u32 denom) {
>>
On Thu, Nov 5, 2015 at 8:32 PM, Sinan Kaya wrote:
> On 11/5/2015 1:07 PM, Andy Shevchenko wrote:
> Let's try again.
>
> static inline u64 mult_frac64(u64 x, u32 numer, u32 denom) {
> u64 rem = x % denom;
> u64 quot = do_div(x, denom);
>
On Thu, Nov 5, 2015 at 5:10 PM, Sinan Kaya wrote:
>
>
> On 11/5/2015 3:48 AM, Andy Shevchenko wrote:
>>
>> On Thu, Nov 5, 2015 at 6:46 AM, Sinan Kaya wrote:
>>>
>>> The MULDIV macro has been designed for small
>>> numbers. It emits an overflow
ux
> Foundation Collaborative Project
>
> --
> 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
--
With Best Regards,
And
On Thu, 2015-03-19 at 21:50 -0500, Tom Tucker wrote:
> Hi Andy,
>
> On 3/19/15 12:54 PM, Andy Shevchenko wrote:
> > On Tue, 2014-04-29 at 17:45 +0300, Andy Shevchenko wrote:
> > > Instead of supplying each byte through stack let's use %pM
> > > specifie
From: Oleksandr Khoshaba
In the kernel we have nice specifier to print MAC by given pointer to the
address in binary form.
Signed-off-by: Oleksandr Khoshaba
Acked-by: Vikas Chaudhary
Signed-off-by: Andy Shevchenko
---
drivers/scsi/qla4xxx/ql4_mbx.c | 5 +
drivers/scsi/qla4xxx/ql4_nx.c
On Tue, 2014-04-29 at 17:45 +0300, Andy Shevchenko wrote:
> Instead of supplying each byte through stack let's use %pM specifier.
Anyone to comment or apply this patch?
>
> Signed-off-by: Andy Shevchenko
> Cc: Tom Tucker
> Cc: Steve Wise
> Cc: linux-r...@vger.kernel.or
On Thu, Jul 25, 2013 at 12:10 PM, Andy Shevchenko
wrote:
> From: Oleksandr Khoshaba
>
> In the kernel we have nice specifier to print MAC by given pointer to the
> address in binary form.
>
> Signed-off-by: Oleksandr Khoshaba
> Acked-by: Vikas Chaudhary
Could a
Instead of pushing each byte via stack the %*ph specifier allows to supply just
a pointer and length of the buffer. The patch converts code to use the
specifier.
Signed-off-by: Andy Shevchenko
---
drivers/target/iscsi/iscsi_target_configfs.c | 13 -
1 file changed, 4 insertions
Instead of pushing each byte via stack let's use custom specifier which allows
to print small buffers as a hex string.
Signed-off-by: Andy Shevchenko
---
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/scsi/qla2xxx/tcm_qla2
Even for signed types we have to check for bigger positive value first.
Otherwise it will be never happened.
Signed-off-by: Andy Shevchenko
---
drivers/scsi/scsi_debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi
Instead of supplying each byte through stack let's use %pM specifier.
Signed-off-by: Andy Shevchenko
Cc: Tom Tucker
Cc: Steve Wise
Cc: linux-r...@vger.kernel.org
---
drivers/scsi/fnic/vnic_dev.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi
The function sas_parse_addr() could be easily substituted by hex2bin() which is
in kernel library code.
Signed-off-by: Andy Shevchenko
Cc: "James E.J. Bottomley"
Cc: linux-scsi@vger.kernel.org
---
drivers/scsi/libsas/sas_scsi_host.c | 23 +++
1 file changed, 7
Instead of pushing each byte via stack let's use custom specifier which allows
to print small buffers as a hex string.
Signed-off-by: Andy Shevchenko
---
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/scsi/qla2xxx/tcm_qla2
Signed-off-by: Andy Shevchenko
---
drivers/scsi/qla2xxx/qla_attr.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index d7a99ae..f925f07 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi
From: Oleksandr Khoshaba
In the kernel we have nice specifier to print MAC by given pointer to the
address in binary form.
Signed-off-by: Oleksandr Khoshaba
Acked-by: Vikas Chaudhary
---
drivers/scsi/qla4xxx/ql4_mbx.c | 5 +
drivers/scsi/qla4xxx/ql4_nx.c | 8 ++--
drivers/scsi/qla4
From: Oleksandr Khoshaba
The patch changes a specifier used to output some variables. Instead of using
stack for each byte the '%*ph[CN]' allows to take a one pointer and prints
entire buffer as a hexadecimal string with the separator ':' or ''.
Signed-off-by: Oleksandr Khoshaba
---
drivers/sc
We have nice specifiers in the kernel that helps us to simplify printing of the
small buffers (as hexstring) and MAC addresses.
Since v1:
- rewritten commit messages to reflect changes better
- append patch 2/3
- apply ACK to patch 3/3
Andy Shevchenko (1):
scsi: qla2xxx: print MAC via %pMR
anks for the patch. In the below patch couple of lines exceed 80 characters.
I think is quite okay to combine string literals to long lines since
checkpatch.pl recommends to do so.
What is your opinion?
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubsc
On Mon, Jun 3, 2013 at 12:06 PM, Jingoo Han wrote:
> The usage of strict_strtoul() is not preferred, because
> strict_strtoul() is obsolete. Thus, kstrtoul() should be
> used.
>
> Signed-off-by: Jingoo Han
Reviewed-by: Andy Shevchenko
> ---
> Changes since v1:
>
ueue_ramp_up_period(struct device *dev,
> struct scsi_device *sdev = to_scsi_device(dev);
> unsigned long period;
>
> - if (strict_strtoul(buf, 10, &period))
> + if (kstrtoul(buf, 10, &period))
> return -EINVAL;
Ditto.
--
With Be
On Thu, 2012-07-12 at 10:55 +0300, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko
> ---
> drivers/message/fusion/mptbase.c | 14 --
> 1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/message/fusion/mptbase.c
> b/drivers/mes
On Thu, 2012-07-26 at 08:23 -0400, Chad Dupuis wrote:
>
> On Thu, 12 Jul 2012, Andy Shevchenko wrote:
>
> > Signed-off-by: Andy Shevchenko
> > ---
> > drivers/scsi/qla2xxx/qla_attr.c |5 +
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
Signed-off-by: Andy Shevchenko
---
drivers/message/fusion/mptbase.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index d99db56..d202f25 100644
--- a/drivers/message/fusion/mptbase.c
+++ b
Signed-off-by: Andy Shevchenko
Cc: Tom Tucker
Cc: Steve Wise
Cc: linux-r...@vger.kernel.org
---
drivers/scsi/fnic/vnic_dev.c | 10 ++
drivers/scsi/qla4xxx/ql4_nx.c |8 ++--
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers
Signed-off-by: Andy Shevchenko
---
drivers/scsi/qla2xxx/qla_attr.c |5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 5ab9530..095ba85 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi
100 matches
Mail list logo