Re: [PATCH 2/3] virtio-scsi: Add FC transport class

2017-12-18 Thread Hannes Reinecke
On 12/15/2017 07:08 PM, Steffen Maier wrote:
> 
> On 12/14/2017 11:11 AM, Hannes Reinecke wrote:
>> When a device announces an 'FC' protocol we should be pulling
>> in the FC transport class to have the rports etc setup correctly.
> 
> It took some time for me to understand what this does.
> It seems to mirror the topology of rports and sdevs that exist under the
> fc_host on the kvm host side to the virtio-scsi-fc side in the guest.
> 
> I like the idea. This is also what I've been suggesting users to do if
> they back virtio-scsi with zfcp on the kvm host side. Primarily to not
> stall all virtio-scsi I/O on all paths if the guest ever gets into
> scsi_eh. But also to make it look like an HBA pass through so one can
> more easily migrate to this once we have FCP pass through.
> 
Thanks for the review.

>>
>> Signed-off-by: Hannes Reinecke 
>> ---
>>   drivers/scsi/virtio_scsi.c | 323
>> ++---
>>   1 file changed, 277 insertions(+), 46 deletions(-)
>>
>> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
>> index a561e90..f925fbd 100644
>> --- a/drivers/scsi/virtio_scsi.c
>> +++ b/drivers/scsi/virtio_scsi.c
> 
>> @@ -591,11 +616,25 @@ static int virtscsi_queuecommand_single(struct
>> Scsi_Host *sh,
>>   struct scsi_cmnd *sc)
> 
>> +    if (vscsi->protocol == SCSI_PROTOCOL_FCP) {
>> +    struct fc_rport *rport =
>> +    starget_to_rport(scsi_target(sc->device));
>> +    if (rport && rport->dd_data) {
>> +    tgt = rport->dd_data;
>> +    target_id = tgt->target_id;
>> +    }
>> +    } else
>> +    tgt = scsi_target(sc->device)->hostdata;
>> +    if (!tgt || tgt->removed) {
> 
>> @@ -648,16 +687,30 @@ static int virtscsi_queuecommand_multi(struct
>> Scsi_Host *sh,
>>  struct scsi_cmnd *sc)
> 
>> +    if (vscsi->protocol == SCSI_PROTOCOL_FCP) {
>> +    struct fc_rport *rport =
>> +    starget_to_rport(scsi_target(sc->device));
>> +    if (rport && rport->dd_data) {
>> +    tgt = rport->dd_data;
>> +    target_id = tgt->target_id;
>> +    }
>> +    } else
>> +    tgt = scsi_target(sc->device)->hostdata;
>> +    if (!tgt || tgt->removed) {
> 
> repeating pattern?
> 
Yeah, I could probably move that to a separate function.

>> @@ -696,12 +749,27 @@ static int virtscsi_device_reset(struct
>> scsi_cmnd *sc)
>>   {
>> +    if (vscsi->protocol == SCSI_PROTOCOL_FCP) {
>> +    struct fc_rport *rport =
>> +    starget_to_rport(scsi_target(sc->device));
>> +    if (rport && rport->dd_data ) {
>> +    tgt = rport->dd_data;
>> +    target_id = tgt->target_id;
>> +    } else
>> +    return FAST_IO_FAIL;
>> +    } else {
>> +    tgt = scsi_target(sc->device)->hostdata;
>> +    if (!tgt || tgt->removed)
> 
> The other patterns have the !tgt check outside of the if else condition.
> For consistency this might work here, too?
> 
Possibly. I'll check.

>> +    return FAST_IO_FAIL;
>> +    }
> 
> 
>> @@ -755,19 +823,34 @@ static int virtscsi_abort(struct scsi_cmnd *sc)
> 
>> +    if (vscsi->protocol == SCSI_PROTOCOL_FCP) {
>> +    struct fc_rport *rport =
>> +    starget_to_rport(scsi_target(sc->device));
>> +    if (rport && rport->dd_data ) {
>> +    tgt = rport->dd_data;
>> +    target_id = tgt->target_id;
>> +    } else
>> +    return FAST_IO_FAIL;
>> +    } else {
>> +    tgt = scsi_target(sc->device)->hostdata;
>> +    if (!tgt || tgt->removed)
>> +    return FAST_IO_FAIL;
>> +    }
> 
> dito
> 
>> @@ -857,27 +970,67 @@ static void virtscsi_rescan_work(struct
>> work_struct *work)
>>
>>   wait_for_completion(&comp);
> 
> Waiting in work item .vs. having the response (IRQ) path trigger
> subsequent processing async ?
> Or do we need the call chain(s) getting here to be in our own process
> context via the workqueue anyway?
> 
Can't see I can parse this sentence, but I'll be looking at the code
trying to come up with a clever explanation :-)

>>   target_id = virtio32_to_cpu(vscsi->vdev, cmd->resp.rescan.id);
>> -    if (target_id != -1) {
>> -    int transport = virtio32_to_cpu(vscsi->vdev,
>> -    cmd->resp.rescan.transport);
>> -    spin_lock_irq(&vscsi->rescan_lock);
>> -    vscsi->next_target_id = target_id + 1;
>> -    spin_unlock_irq(&vscsi->rescan_lock);
>> -    shost_printk(KERN_INFO, sh,
>> - "found %s target %d (WWN %*phN)\n",
>> - transport == SCSI_PROTOCOL_FCP ? "FC" : "SAS",
>> - target_id, 8,
>> - cmd->resp.rescan.port_wwn);
>> -    scsi_scan_target(&sh->shost_gendev, 0, target_id,
>> - SCAN_WILD_CARD, SCSI_SCAN_INITIAL);
>> -    queue_work(system_freezable_wq, &vscsi->rescan_work);
>> -    } else {
>> +    if (target_id == -1) {
> 
> This boolean if expression was introduced in 

Re: scsi_devinfo: devices and pattern matching

2017-12-18 Thread Hannes Reinecke
On 12/16/2017 02:31 PM, Xose Vazquez Perez wrote:
> Hi,
> 
> After last pattern matching changes, maybe some entries should be revised:
> 
> 
> Empty strings(current meaning?):
>   {"", "Scanner", "1.80", BLIST_NOLUN},   /* responds to all lun */
>   {"Promise", "", NULL, BLIST_SPARSELUN},
>   {"HP", "C1790A", "", BLIST_NOLUN},  /* scanjet iip */
>   {"HP", "C2500A", "", BLIST_NOLUN},  /* scanjet iicx */
> 
We would need to check what the hardware actually returns, whether it
_really_ is an empty string or whether it's meant to be a catch-all entry.

> 
> Overlapping(?) strings(remove one???):
>   {"DELL", "PV660F", NULL, BLIST_SPARSELUN},
>   {"DELL", "PV660F   PSEUDO", NULL, BLIST_SPARSELUN},>
>   {"NRC", "MBR-7", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
>   {"NRC", "MBR-7.4", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
>   
>   {"Promise", "", NULL, BLIST_SPARSELUN},
>   {"Promise", "VTrak E610f", NULL, BLIST_SPARSELUN | BLIST_NO_RSOC},
> 
That is by design, and nothing to worry about, as the specific entries
are subsets of the more generic entries.

> 
> Odd "revision level" string(is it right? EOT?):
> {"SEAGATE", "ST157N", "\004|j", BLIST_NOLUN},
> 
> 
We might need to check what the ST157N actually returns; if we can't I
fear the entry need to stay as it is.

> Duplicate strings(They should be merged):
>   {"TEXEL", "CD-ROM", "1.06", BLIST_BORKEN},
>   {"TEXEL", "CD-ROM", "1.06", BLIST_NOLUN},
> 
Ah. Good point. Yes, it should be merged.

> 
> Keep in mind, for future patches, that there are regex metacharacters(!!):
> {"IOMEGA", "Io20S *F", NULL, BLIST_KEY},
> {"INSITE", "Floptical   F*8I", NULL, BLIST_KEY},
> {"DELL", "PSEUDO DEVICE .", NULL, BLIST_SPARSELUN}, /* Dell PV 
> 530F */
> 
Hmm. Yes, but again we need to validate this with real hardware before
making any changes here.

> 
> For homogeneity reasons, should "*" revision level be replaced by NULL?
> 
> 
> And the current pattern matching algorithm should be described clearer, right
> now it's a bit confused.
> 
I'll be sending out a blktest entry for the devinfo string matching;
that will give us a proper regression test suite.

Cheers,

Hannes
-- 
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)


Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Andy Shevchenko
On Mon, Dec 18, 2017 at 2:28 AM, Joe Perches  wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches 

>  drivers/platform/x86/eeepc-laptop.c  |  2 +-

> diff --git a/drivers/platform/x86/eeepc-laptop.c 
> b/drivers/platform/x86/eeepc-laptop.c
> index 5a681962899c..4c38904a8a32 100644
> --- a/drivers/platform/x86/eeepc-laptop.c
> +++ b/drivers/platform/x86/eeepc-laptop.c
> @@ -492,7 +492,7 @@ static void eeepc_platform_exit(struct eeepc_laptop 
> *eeepc)
>   * potentially bad time, such 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-b5ze-s3.c
> index a319bf1e49de..ef5c16dfabfa 100644

Acked-by: Andy Shevchenko 

for PDx86 changes.


-- 
With Best Regards,
Andy Shevchenko


Re: [PATCH] scsi: check for device state in __scsi_remove_target()

2017-12-18 Thread Ewan D. Milne
On Thu, 2017-12-14 at 17:10 -0500, Ewan D. Milne wrote:
> On Thu, 2017-12-14 at 10:02 +0100, Hannes Reinecke wrote:
> > On 12/14/2017 09:05 AM, Jason Yan wrote:
> > > 
> > > On 2017/12/14 6:23, Bart Van Assche wrote:
> > >> On Wed, 2017-12-13 at 14:21 +0100, Hannes Reinecke wrote:
> > >>> As it turned out device_get() doesn't use kref_get_unless_zero(),
> > >>> so we will be always getting a device pointer.
> > >>> So we need to check for the device state in __scsi_remove_target()
> > >>> to avoid tripping over deleted objects.
> > >>>
> > >>> Fixes: fbce4d9 ("scsi: fixup kernel warning during rmmod()")
> > >>
> > >> How about adding Reported-by: Jason Yan? See also
> > >> https://www.spinics.net/lists/linux-scsi/msg115295.html
> > >>
> > >> Anyway:
> > >>
> > >> Reviewed-by: Bart Van Assche 
> > >>
> > > 
> > > Seems the same as my patch.So how do we plan to fix this issue,
> > > pick this approach up or the approach James Bottomley suggested?
> > > I have sent a patch to change get_device() but Greg seems do not
> > > like this way.
> > > 
> > This is actually a real regression, which can be trivially exercised by
> > eg logging out from two connections to an iSCSI target.
> > (Our QA tripped across that one).
> > So I'd rather have to have it fixed reasonably soon.
> > 
> > While 'get_device' is IMO the 'correct' solution it surely warrants a
> > broader discussion, plus one would need to audit all callers to check
> > the return value. If we were going down that route we should probably
> > add a __must_check to get_device(), too.
> > But again, this will probably drag out for quite some time, and I'd
> > prefer to have the fix in the meantime.
> > 
> > Cheers,
> > 
> > Hannes
> 
> We have 2 reproducible test cases, this patch fixes one of them,
> which was a continually oscillating FC target port w/short dev_loss_tmo.
> I'm still waiting for a report on the iSCSI test.  The code looks good.
> We need to get some kind of fix for this sooner rather than later.
> 
> Reviewed-by: Ewan D. Milne 

Report here is that Hannes's patch fixes our failing iSCSI test also.
Martin/James, can we get this in please?





RE: Driver version for PMC Adaptec HBA in Linux and from vendor

2017-12-18 Thread Raghava Aditya Renukunta

Hi Paul,

> -Original Message-
> From: Paul Menzel [mailto:pmen...@molgen.mpg.de]
> Sent: Saturday, December 16, 2017 1:39 AM
> To: Raghava Aditya Renukunta
> ; dl-esc-Aacraid Linux Driver
> 
> Cc: linux-scsi@vger.kernel.org; it+linux-s...@vger.kernel.org
> Subject: Re: Driver version for PMC Adaptec HBA in Linux and from vendor
> 
> EXTERNAL EMAIL
> 
> 
> Dear Aditya,
> 
> 
> Am 17.02.2017 um 20:29 schrieb Raghava Aditya Renukunta:
> 
> >> Using a PMC Adaptec HBA 1000-8e with latest Linux, it only initializes
> >> in sync mode, instead of async mode.
> >
> > The patches that enable async mode in HBA 1000-8e, have been included in
> the James Bottomley's linux-scsi Branch and are on track be
> > Included into Linux 4.11.
> >
> > https://git.kernel.org/cgit/linux/kernel/git/jejb/scsi.git/
> >
> >> ```
> >> $ git describe --tag
> >> v4.10-rc8-47-g0722f57bf
> >> $ dmesg
> >> [   21.359635] Adaptec aacraid driver 1.2-1[41066]-ms
> >> [   21.360017] aacraid :04:00.0: can't disable ASPM; OS doesn't have
> >> ASPM control
> >> [   21.363987] AAC0: Async. mode not supported by current driver, sync.
> >> mode enforced.
> >> [   21.363987] Please update driver to get full performance.
> >> [   21.364949] AAC0: kernel 1.2-0[0] Nov  5 2015
> >> [   21.365275] AAC0: monitor 0.0-0[0]
> >> [   21.371382] AAC0: bios 0.13-209[32000]
> >> [   21.371711] AAC0: serial 10F447
> >> [   21.372035] AAC0: Non-DASD support enabled.
> >> [   21.372360] AAC0: 64bit support enabled.
> >> [   21.372688] AAC0: 64 Bit DAC enabled
> >> […]
> >> $ git grep 'AAC_DRIVER_BUILD 41066'
> >> drivers/scsi/aacraid/aacraid.h:# define AAC_DRIVER_BUILD 41066
> >> ```
> >>
> >> Searching the vendor Web site, there is *Linux Driver Source
> >> 1.2.1-53005* available for download [1].
> >
> > The latest upstream driver version is 50740. We will be reaching version
> 53005 in couple of patch sets  ( ~ 3).
> >
> >
> http://git.kernel.org/cgit/linux/kernel/git/jejb/scsi.git/commit/?id=96f6a613
> 4766de0d42a98c7758736dde16e0add5
> 
> Thank you for the details. At our infrastructure we only want to use LTS
> Linux kernels, and the latest in 4.14. So right now, Linux 4.14.6
> includes version 50834 [1], which is the same version currently in Linus
> master branch (4.15-rc3). Is that save to use with async mode, or are
> you aware of problems and we should always use the latest out of tree
> driver, which is at version 55022 and can be download from the Microsemi
> server [3].

Well at this point I am in the process of creating a patch set that solves a 
kdump regression issue(Should be out before the new year), other than that the 
upstream driver is pretty much up to date. If kdump support is a must  for you 
I would recommend that  55022 be used.

> >> How does the upstream process work? Is there a git repository
> somewhere
> >> from Microsemi? Are the patches already up for review? (I didn’t find
> them.)
> >
> > We try to push out patch sets to kernel.org for every major  driver release
> we make.  Usually they go into the
> > sub component maintainers branch (linux-scsi ) , which is then pushed out
> to Linus when the merge
> > window for  opens (currently the merge window for 4.10 is closed , barring
> fixes). So Linux version 4.11 should have
> > full async support and more for HBA1000-8e.
> >
> > We do not maintain a git repository unfortunately, but we do release the
> source code for every release as you
> > indicated.
> >
> > For further reference the patches are sent out in the scsi mailing list 
> > linux-
> s...@vger.kernel.org ,
> > the archive is here http://marc.info/?l=linux-scsi&r=1&w=2 .
> >
> > Hope I cleared up your doubts. Please do reach out if you have other
> concerns or questions.
> 
> Yes, thank you for your elaborate answer, which cleared up a lot of my
> doubts. We would be even more satisfied if you moved your development
> fully to the Linux kernel tree, so that it always carries the latest
> driver. If we can help with that by contacting certain people, please
> tell us.

 We would love to, but  we have lots of customers who are on the older kernel 
versions 2.6.32, 3.10.0 etc and It becomes almost impossible for us to fully 
move our development to the  Linux kernel tree and support our customers at the 
same time.  Hopefully we will start being up to date with the upstream kernel 
in the coming months. Hope that answered your questions.

Thanks and Happy Holidays!
Raghava Aditya 

> Kind regards,
> 
> Paul
> 
> 
> >> [1] https://storage.microsemi.com/en-us/speed/raid/aac/linux/aacraid-
> linux-src-1_2_1-53005_tgz.php
> [2]
> https://elixir.free-
> electrons.com/linux/v4.14.6/source/drivers/scsi/aacraid/aacraid.h#L100
> [3]
> https://storage.microsemi.com/en-
> us/downloads/linux_source/linux_source_code/productid=aha-1000-
> 8e&dn=microsemi+adaptec+hba+1000-8e.php


Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Rafael J. Wysocki
On Monday, December 18, 2017 1:28:44 AM CET Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
> 
> Move those braces to column 1.
> 
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
> 
> Miscellanea:
> 
> o Remove extra trailing ; and blank line from xfs_agf_verify
> 
> Signed-off-by: Joe Perches 
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
> 
> (this is against -next, but it applies against Linus' tree
>  with a couple offsets)
> 
>  arch/x86/include/asm/atomic64_32.h   |  2 +-
>  drivers/acpi/custom_method.c |  2 +-
>  drivers/acpi/fan.c   |  2 +-
>  drivers/gpu/drm/amd/display/dc/core/dc.c |  2 +-
>  drivers/media/i2c/msp3400-kthreads.c |  2 +-
>  drivers/message/fusion/mptsas.c  |  2 +-
>  drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c |  2 +-
>  drivers/net/wireless/ath/ath9k/xmit.c|  2 +-
>  drivers/platform/x86/eeepc-laptop.c  |  2 +-
>  drivers/rtc/rtc-ab-b5ze-s3.c |  2 +-
>  drivers/scsi/dpt_i2o.c   |  2 +-
>  drivers/scsi/sym53c8xx_2/sym_glue.c  |  2 +-
>  fs/locks.c   |  2 +-
>  fs/ocfs2/stack_user.c|  2 +-
>  fs/xfs/libxfs/xfs_alloc.c|  5 ++---
>  fs/xfs/xfs_export.c  |  2 +-
>  kernel/audit.c   |  6 +++---
>  kernel/trace/trace_printk.c  |  4 ++--
>  lib/raid6/sse2.c | 14 +++---
>  sound/soc/fsl/fsl_dma.c  |  2 +-
>  20 files changed, 30 insertions(+), 31 deletions(-)
> 
> diff --git a/arch/x86/include/asm/atomic64_32.h 
> b/arch/x86/include/asm/atomic64_32.h
> index 97c46b8169b7..d4d4883080fa 100644
> --- a/arch/x86/include/asm/atomic64_32.h
> +++ b/arch/x86/include/asm/atomic64_32.h
> @@ -122,7 +122,7 @@ static inline long long atomic64_read(const atomic64_t *v)
>   long long r;
>   alternative_atomic64(read, "=&A" (r), "c" (v) : "memory");
>   return r;
> - }
> +}
>  
>  /**
>   * atomic64_add_return - add and return
> diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
> index c68e72414a67..e967c1173ba3 100644
> --- a/drivers/acpi/custom_method.c
> +++ b/drivers/acpi/custom_method.c
> @@ -94,7 +94,7 @@ static void __exit acpi_custom_method_exit(void)
>  {
>   if (cm_dentry)
>   debugfs_remove(cm_dentry);
> - }
> +}
>  
>  module_init(acpi_custom_method_init);
>  module_exit(acpi_custom_method_exit);
> diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
> index 6cf4988206f2..3563103590c6 100644
> --- a/drivers/acpi/fan.c
> +++ b/drivers/acpi/fan.c
> @@ -219,7 +219,7 @@ fan_set_cur_state(struct thermal_cooling_device *cdev, 
> unsigned long state)
>   return fan_set_state_acpi4(device, state);
>   else
>   return fan_set_state(device, state);
> - }
> +}
>  
>  static const struct thermal_cooling_device_ops fan_cooling_ops = {
>   .get_max_state = fan_get_max_state,
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
> b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index d1488d5ee028..1e0d1e7c5324 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -461,7 +461,7 @@ static void disable_dangling_plane(struct dc *dc, struct 
> dc_state *context)
>   
> **/
>  
>  struct dc *dc_create(const struct dc_init_data *init_params)
> - {
> +{
>   struct dc *dc = kzalloc(sizeof(*dc), GFP_KERNEL);
>   unsigned int full_pipe_count;
>  
> diff --git a/drivers/media/i2c/msp3400-kthreads.c 
> b/drivers/media/i2c/msp3400-kthreads.c
> index 4dd01e9f553b..dc6cb8d475b3 100644
> --- a/drivers/media/i2c/msp3400-kthreads.c
> +++ b/drivers/media/i2c/msp3400-kthreads.c
> @@ -885,7 +885,7 @@ static int msp34xxg_modus(struct i2c_client *client)
>  }
>  
>  static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
> - {
> +{
>   struct msp_state *state = to_state(i2c_get_clientdata(client));
>   int source, matrix;
>  
> diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
> index 345f6035599e..69a62d23514b 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -2968,7 +2968,7 @@ mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc,
>   mutex_unlock(&ioc->sas_mgmt.mutex);
>  out:
>   return ret;
> - }
> +}
>  
>  static void
>  mptsas_parse_device_info(struct sas_identify *identify,
> diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c 
> b/driv

Re: [PATCH v16 3/4] hinic: Replace PCI pool old API

2017-12-18 Thread David Miller
From: Romain Perier 
Date: Fri, 15 Dec 2017 20:31:22 +0100

> From: Romain Perier 
> 
> The PCI pool API is deprecated. This commit replaces the PCI pool old
> API by the appropriate function with the DMA pool API.
> 
> Signed-off-by: Romain Perier 

Acked-by: David S. Miller 


Re: [PATCH v16 2/4] net: e100: Replace PCI pool old API

2017-12-18 Thread David Miller
From: Romain Perier 
Date: Fri, 15 Dec 2017 20:31:21 +0100

> From: Romain Perier 
> 
> The PCI pool API is deprecated. This commit replaces the PCI pool old
> API by the appropriate function with the DMA pool API.
> 
> Signed-off-by: Romain Perier 
> Acked-by: Peter Senna Tschudin 
> Acked-by: Jeff Kirsher 
> Tested-by: Peter Senna Tschudin 

Acked-by: David S. Miller 


Re: Distress Call Please don't ignore

2017-12-18 Thread Sandra Younes
Good Day,

Forgive my indignation if this message comes to you as a surprise and may 
offend your personality for contacting you without your prior consent and 
writing through this channel.

I came across your name and contact on the course of my personal searching when 
i was searching for a foreign reliable partner. I was assured of your 
capability and reliability after going true your profile.

I'm (Miss. Sandra) from Benghazi libya, My father of blessed memory by name 
late General Abdel Fattah Younes who was shot death by Islamist-linked militia 
within the anti-Gaddafi forces on 28th July, 2011 and after two days later my 
mother with my two brothers was killed one early morning by the rebels as 
result of civil war that is going on in my country Libya, then after the burial 
of my parents, my uncles conspired and sold my father's properties and left 
nothing for me. On a faithful morning, I opened my father's briefcase and 
discover a document which he has deposited ($6.250M USD) in a bank in a Turkish 
Bank which has a small branch in Canada with my name as the legitimate/next of 
kin. Meanwhile i have located the bank,and have also discussed the possiblity 
of transfering the fund. My father left a clause to the bank that i must 
introduce a trusted foreign partner who would be my trustee to help me invest 
this fund; hence the need for your assistance,i request that you be my t
rustee and assist me in e

You will also be responsible for the investment and management of the fund for 
me and also you will help me get a good school where i will further my 
education.
I agreed to give you 40% of the $6.250M once the transfer is done. this is my 
true life story, I will be glad to receive your respond soonest for more 
details to enable us start and champion the transfer less than 14 banking days 
as i was informed by the bank manager.

Thanks for giving me your attention,

Yours sincerely,
Miss. Sandra Younes


Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Paul Moore
On Sun, Dec 17, 2017 at 7:28 PM, Joe Perches  wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches 
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
>
> (this is against -next, but it applies against Linus' tree
>  with a couple offsets)
>
>  arch/x86/include/asm/atomic64_32.h   |  2 +-
>  drivers/acpi/custom_method.c |  2 +-
>  drivers/acpi/fan.c   |  2 +-
>  drivers/gpu/drm/amd/display/dc/core/dc.c |  2 +-
>  drivers/media/i2c/msp3400-kthreads.c |  2 +-
>  drivers/message/fusion/mptsas.c  |  2 +-
>  drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c |  2 +-
>  drivers/net/wireless/ath/ath9k/xmit.c|  2 +-
>  drivers/platform/x86/eeepc-laptop.c  |  2 +-
>  drivers/rtc/rtc-ab-b5ze-s3.c |  2 +-
>  drivers/scsi/dpt_i2o.c   |  2 +-
>  drivers/scsi/sym53c8xx_2/sym_glue.c  |  2 +-
>  fs/locks.c   |  2 +-
>  fs/ocfs2/stack_user.c|  2 +-
>  fs/xfs/libxfs/xfs_alloc.c|  5 ++---
>  fs/xfs/xfs_export.c  |  2 +-
>  kernel/audit.c   |  6 +++---
>  kernel/trace/trace_printk.c  |  4 ++--
>  lib/raid6/sse2.c | 14 +++---
>  sound/soc/fsl/fsl_dma.c  |  2 +-
>  20 files changed, 30 insertions(+), 31 deletions(-)

For the audit bits ...

Acked-by: Paul Moore 

-- 
paul moore
www.paul-moore.com


Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Alex Deucher
On Sun, Dec 17, 2017 at 7:28 PM, Joe Perches  wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches 
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
>
> (this is against -next, but it applies against Linus' tree
>  with a couple offsets)
>
>  arch/x86/include/asm/atomic64_32.h   |  2 +-
>  drivers/acpi/custom_method.c |  2 +-
>  drivers/acpi/fan.c   |  2 +-
>  drivers/gpu/drm/amd/display/dc/core/dc.c |  2 +-

For amdgpu:
Acked-by: Alex Deucher 

>  drivers/media/i2c/msp3400-kthreads.c |  2 +-
>  drivers/message/fusion/mptsas.c  |  2 +-
>  drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c |  2 +-
>  drivers/net/wireless/ath/ath9k/xmit.c|  2 +-
>  drivers/platform/x86/eeepc-laptop.c  |  2 +-
>  drivers/rtc/rtc-ab-b5ze-s3.c |  2 +-
>  drivers/scsi/dpt_i2o.c   |  2 +-
>  drivers/scsi/sym53c8xx_2/sym_glue.c  |  2 +-
>  fs/locks.c   |  2 +-
>  fs/ocfs2/stack_user.c|  2 +-
>  fs/xfs/libxfs/xfs_alloc.c|  5 ++---
>  fs/xfs/xfs_export.c  |  2 +-
>  kernel/audit.c   |  6 +++---
>  kernel/trace/trace_printk.c  |  4 ++--
>  lib/raid6/sse2.c | 14 +++---
>  sound/soc/fsl/fsl_dma.c  |  2 +-
>  20 files changed, 30 insertions(+), 31 deletions(-)
>
> diff --git a/arch/x86/include/asm/atomic64_32.h 
> b/arch/x86/include/asm/atomic64_32.h
> index 97c46b8169b7..d4d4883080fa 100644
> --- a/arch/x86/include/asm/atomic64_32.h
> +++ b/arch/x86/include/asm/atomic64_32.h
> @@ -122,7 +122,7 @@ static inline long long atomic64_read(const atomic64_t *v)
> long long r;
> alternative_atomic64(read, "=&A" (r), "c" (v) : "memory");
> return r;
> - }
> +}
>
>  /**
>   * atomic64_add_return - add and return
> diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
> index c68e72414a67..e967c1173ba3 100644
> --- a/drivers/acpi/custom_method.c
> +++ b/drivers/acpi/custom_method.c
> @@ -94,7 +94,7 @@ static void __exit acpi_custom_method_exit(void)
>  {
> if (cm_dentry)
> debugfs_remove(cm_dentry);
> - }
> +}
>
>  module_init(acpi_custom_method_init);
>  module_exit(acpi_custom_method_exit);
> diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
> index 6cf4988206f2..3563103590c6 100644
> --- a/drivers/acpi/fan.c
> +++ b/drivers/acpi/fan.c
> @@ -219,7 +219,7 @@ fan_set_cur_state(struct thermal_cooling_device *cdev, 
> unsigned long state)
> return fan_set_state_acpi4(device, state);
> else
> return fan_set_state(device, state);
> - }
> +}
>
>  static const struct thermal_cooling_device_ops fan_cooling_ops = {
> .get_max_state = fan_get_max_state,
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
> b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index d1488d5ee028..1e0d1e7c5324 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -461,7 +461,7 @@ static void disable_dangling_plane(struct dc *dc, struct 
> dc_state *context)
>   
> **/
>
>  struct dc *dc_create(const struct dc_init_data *init_params)
> - {
> +{
> struct dc *dc = kzalloc(sizeof(*dc), GFP_KERNEL);
> unsigned int full_pipe_count;
>
> diff --git a/drivers/media/i2c/msp3400-kthreads.c 
> b/drivers/media/i2c/msp3400-kthreads.c
> index 4dd01e9f553b..dc6cb8d475b3 100644
> --- a/drivers/media/i2c/msp3400-kthreads.c
> +++ b/drivers/media/i2c/msp3400-kthreads.c
> @@ -885,7 +885,7 @@ static int msp34xxg_modus(struct i2c_client *client)
>  }
>
>  static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
> - {
> +{
> struct msp_state *state = to_state(i2c_get_clientdata(client));
> int source, matrix;
>
> diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
> index 345f6035599e..69a62d23514b 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -2968,7 +2968,7 @@ mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc,
> mutex_unlock(&ioc->sas_mgmt.mutex);
>  out:
> return ret;
> - }
> +}
>
>  static void
>  mptsas_parse_device_info(struct sas_identify *identify,
> diff --git a/drivers/net/ethernet/qlogic/

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Darrick J. Wong
On Sun, Dec 17, 2017 at 04:28:44PM -0800, Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
> 
> Move those braces to column 1.
> 
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
> 
> Miscellanea:
> 
> o Remove extra trailing ; and blank line from xfs_agf_verify
> 
> Signed-off-by: Joe Perches 
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
> 
> (this is against -next, but it applies against Linus' tree
>  with a couple offsets)
> 
>  arch/x86/include/asm/atomic64_32.h   |  2 +-
>  drivers/acpi/custom_method.c |  2 +-
>  drivers/acpi/fan.c   |  2 +-
>  drivers/gpu/drm/amd/display/dc/core/dc.c |  2 +-
>  drivers/media/i2c/msp3400-kthreads.c |  2 +-
>  drivers/message/fusion/mptsas.c  |  2 +-
>  drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c |  2 +-
>  drivers/net/wireless/ath/ath9k/xmit.c|  2 +-
>  drivers/platform/x86/eeepc-laptop.c  |  2 +-
>  drivers/rtc/rtc-ab-b5ze-s3.c |  2 +-
>  drivers/scsi/dpt_i2o.c   |  2 +-
>  drivers/scsi/sym53c8xx_2/sym_glue.c  |  2 +-
>  fs/locks.c   |  2 +-
>  fs/ocfs2/stack_user.c|  2 +-
>  fs/xfs/libxfs/xfs_alloc.c|  5 ++---
>  fs/xfs/xfs_export.c  |  2 +-
>  kernel/audit.c   |  6 +++---
>  kernel/trace/trace_printk.c  |  4 ++--
>  lib/raid6/sse2.c | 14 +++---
>  sound/soc/fsl/fsl_dma.c  |  2 +-
>  20 files changed, 30 insertions(+), 31 deletions(-)
> 
> diff --git a/arch/x86/include/asm/atomic64_32.h 
> b/arch/x86/include/asm/atomic64_32.h
> index 97c46b8169b7..d4d4883080fa 100644
> --- a/arch/x86/include/asm/atomic64_32.h
> +++ b/arch/x86/include/asm/atomic64_32.h
> @@ -122,7 +122,7 @@ static inline long long atomic64_read(const atomic64_t *v)
>   long long r;
>   alternative_atomic64(read, "=&A" (r), "c" (v) : "memory");
>   return r;
> - }
> +}
>  
>  /**
>   * atomic64_add_return - add and return
> diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
> index c68e72414a67..e967c1173ba3 100644
> --- a/drivers/acpi/custom_method.c
> +++ b/drivers/acpi/custom_method.c
> @@ -94,7 +94,7 @@ static void __exit acpi_custom_method_exit(void)
>  {
>   if (cm_dentry)
>   debugfs_remove(cm_dentry);
> - }
> +}
>  
>  module_init(acpi_custom_method_init);
>  module_exit(acpi_custom_method_exit);
> diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
> index 6cf4988206f2..3563103590c6 100644
> --- a/drivers/acpi/fan.c
> +++ b/drivers/acpi/fan.c
> @@ -219,7 +219,7 @@ fan_set_cur_state(struct thermal_cooling_device *cdev, 
> unsigned long state)
>   return fan_set_state_acpi4(device, state);
>   else
>   return fan_set_state(device, state);
> - }
> +}
>  
>  static const struct thermal_cooling_device_ops fan_cooling_ops = {
>   .get_max_state = fan_get_max_state,
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
> b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index d1488d5ee028..1e0d1e7c5324 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -461,7 +461,7 @@ static void disable_dangling_plane(struct dc *dc, struct 
> dc_state *context)
>   
> **/
>  
>  struct dc *dc_create(const struct dc_init_data *init_params)
> - {
> +{
>   struct dc *dc = kzalloc(sizeof(*dc), GFP_KERNEL);
>   unsigned int full_pipe_count;
>  
> diff --git a/drivers/media/i2c/msp3400-kthreads.c 
> b/drivers/media/i2c/msp3400-kthreads.c
> index 4dd01e9f553b..dc6cb8d475b3 100644
> --- a/drivers/media/i2c/msp3400-kthreads.c
> +++ b/drivers/media/i2c/msp3400-kthreads.c
> @@ -885,7 +885,7 @@ static int msp34xxg_modus(struct i2c_client *client)
>  }
>  
>  static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
> - {
> +{
>   struct msp_state *state = to_state(i2c_get_clientdata(client));
>   int source, matrix;
>  
> diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
> index 345f6035599e..69a62d23514b 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -2968,7 +2968,7 @@ mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc,
>   mutex_unlock(&ioc->sas_mgmt.mutex);
>  out:
>   return ret;
> - }
> +}
>  
>  static void
>  mptsas_parse_device_info(struct sas_identify *identify,
> diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c 
> b/driver

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Dave Chinner
On Sun, Dec 17, 2017 at 04:28:44PM -0800, Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
> 
> Move those braces to column 1.
> 
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
> 
> Miscellanea:
> 
> o Remove extra trailing ; and blank line from xfs_agf_verify
> 
> Signed-off-by: Joe Perches 
> ---


XFS bits look fine.

Acked-by: Dave Chinner 

-- 
Dave Chinner
da...@fromorbit.com


Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Alexandre Belloni
On 17/12/2017 at 16:28:44 -0800, Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
> 
> Move those braces to column 1.
> 
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
> 
> Miscellanea:
> 
> o Remove extra trailing ; and blank line from xfs_agf_verify
> 
> Signed-off-by: Joe Perches 

For RTC:

Acked-by: Alexandre Belloni 


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


[PATCH] scsi: hisi_sas: fix a warning reported by sparse

2017-12-18 Thread chenxiang
The type of function pci_choose_state's return value is pci_power_t while we
define it as a u32. A warning will be reported by sparse. So change u32 
into pci_power_t.

Signed-off-by: Xiang Chen 
---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c 
b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 6a408d2..05fb291 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -2309,7 +2309,8 @@ static int hisi_sas_v3_suspend(struct pci_dev *pdev, 
pm_message_t state)
struct hisi_hba *hisi_hba = sha->lldd_ha;
struct device *dev = hisi_hba->dev;
struct Scsi_Host *shost = hisi_hba->shost;
-   u32 device_state, status;
+   u32 status;
+   pci_power_t device_state;
int rc;
u32 reg_val;
unsigned long flags;
@@ -2371,7 +2372,7 @@ static int hisi_sas_v3_resume(struct pci_dev *pdev)
struct Scsi_Host *shost = hisi_hba->shost;
struct device *dev = hisi_hba->dev;
unsigned int rc;
-   u32 device_state = pdev->current_state;
+   pci_power_t device_state = pdev->current_state;
 
dev_warn(dev, "resuming from operating state [D%d]\n",
device_state);
-- 
1.9.1



Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Martin K. Petersen

Joe,

> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.

SCSI bits look OK.

Acked-by: Martin K. Petersen 

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] qedi: Fix a possible sleep-in-atomic bug in qedi_process_tmf_resp

2017-12-18 Thread Martin K. Petersen

Jia-Ju,

> To fix it, GFP_KERNEL is replaced with GFP_ATOMIC.
>
> This bug is found by my static analysis tool(DSAC) and checked by my
> code review.

Applied to 4.16/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: check for device state in __scsi_remove_target()

2017-12-18 Thread Martin K. Petersen

Hannes,

> As it turned out device_get() doesn't use kref_get_unless_zero(),
> so we will be always getting a device pointer.
> So we need to check for the device state in __scsi_remove_target()
> to avoid tripping over deleted objects.

Applied to 4.15/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que

2017-12-18 Thread Martin K. Petersen

Himanshu,

> This patch fixes following warnings reported by smatch
>
> drivers/scsi/qla2xxx/qla_mid.c:586 qla25xx_delete_req_que()
> error: we previously assumed 'req' could be null (see line 580)
>
> drivers/scsi/qla2xxx/qla_mid.c:602 qla25xx_delete_rsp_que()
> error: we previously assumed 'rsp' could be null (see line 596)

Applied to 4.16/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: hisi_sas: fix a warning reported by sparse

2017-12-18 Thread Martin K. Petersen

chenxiang,

> The type of function pci_choose_state's return value is pci_power_t
> while we define it as a u32. A warning will be reported by sparse. So
> change u32 into pci_power_t.

Applied to 4.16/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [alsa-devel] [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 01:28:44 +0100,
Joe Perches wrote:
> 
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
> 
> Move those braces to column 1.
> 
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
> 
> Miscellanea:
> 
> o Remove extra trailing ; and blank line from xfs_agf_verify
> 
> Signed-off-by: Joe Perches 
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
> 
> (this is against -next, but it applies against Linus' tree
>  with a couple offsets)
> 
>  arch/x86/include/asm/atomic64_32.h   |  2 +-
>  drivers/acpi/custom_method.c |  2 +-
>  drivers/acpi/fan.c   |  2 +-
>  drivers/gpu/drm/amd/display/dc/core/dc.c |  2 +-
>  drivers/media/i2c/msp3400-kthreads.c |  2 +-
>  drivers/message/fusion/mptsas.c  |  2 +-
>  drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c |  2 +-
>  drivers/net/wireless/ath/ath9k/xmit.c|  2 +-
>  drivers/platform/x86/eeepc-laptop.c  |  2 +-
>  drivers/rtc/rtc-ab-b5ze-s3.c |  2 +-
>  drivers/scsi/dpt_i2o.c   |  2 +-
>  drivers/scsi/sym53c8xx_2/sym_glue.c  |  2 +-
>  fs/locks.c   |  2 +-
>  fs/ocfs2/stack_user.c|  2 +-
>  fs/xfs/libxfs/xfs_alloc.c|  5 ++---
>  fs/xfs/xfs_export.c  |  2 +-
>  kernel/audit.c   |  6 +++---
>  kernel/trace/trace_printk.c  |  4 ++--
>  lib/raid6/sse2.c | 14 +++---
>  sound/soc/fsl/fsl_dma.c  |  2 +-

For sound bits,
  Acked-by: Takashi Iwai 


thanks,

Takashi