linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>,
	benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au
Cc: seroyer@linux.vnet.ibm.com, jjalvare@linux.vnet.ibm.com,
	alex.williamson@redhat.com, helgaas@kernel.org,
	ruscur@russell.cc, linux-pci@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, bodong@mellanox.com,
	eli@mellanox.com, saeedm@mellanox.com
Subject: Re: [PATCH v1 2/7] powerpc/kernel: Add uevents in EEH error/resume
Date: Mon, 18 Dec 2017 12:45:15 -0600	[thread overview]
Message-ID: <f316a133-6548-4ad2-1560-98c9d7b8f7f9@linux.vnet.ibm.com> (raw)
In-Reply-To: <79cea2a4-510d-37b5-0892-c87ffd0221b4@ozlabs.ru>


On 12/17/17 9:54 PM, Alexey Kardashevskiy wrote:

> On 14/12/17 02:32, Bryant G. Ly wrote:
>> Devices can go offline when EEH is reported. This patch adds
>> a change to the kernel object and lets udev know of error.
>> When device resumes a change is also set reporting device as
>> online. Therefore, EEH events are better propagated to user
>> space for devices in powerpc arch.
>>
>> Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
>> Signed-off-by: Juan J. Alvarez <jjalvare@linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/kernel/eeh_driver.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
>> index 3c0fa99c5533..c61bf770282b 100644
>> --- a/arch/powerpc/kernel/eeh_driver.c
>> +++ b/arch/powerpc/kernel/eeh_driver.c
>> @@ -204,6 +204,7 @@ static void *eeh_report_error(void *data, void *userdata)
>>  	struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
>>  	enum pci_ers_result rc, *res = userdata;
>>  	struct pci_driver *driver;
>> +	char *envp[] = {"EVENT=EEH_ERROR", "ONLINE=0", NULL};
> scripts/checkpatch.pl:
>
> WARNING: char * array declaration might be better as static const
> #27: FILE: arch/powerpc/kernel/eeh_driver.c:207:
> +       char *envp[] = {"EVENT=EEH_ERROR", "ONLINE=0", NULL};
>
>
>
>>  
>>  	if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
>>  		return NULL;
>> @@ -228,6 +229,7 @@ static void *eeh_report_error(void *data, void *userdata)
>>  
>>  	edev->in_error = true;
>>  	eeh_pcid_put(dev);
>> +	kobject_uevent_env(&dev->dev.kobj, KOBJ_CHANGE, envp);
>>  	return NULL;
>>  }
>>  
>> @@ -358,6 +360,7 @@ static void *eeh_report_resume(void *data, void *userdata)
>>  	struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
>>  	bool was_in_error;
>>  	struct pci_driver *driver;
>> +	char *envp[] = {"EVENT=EEH_RESUME", "ONLINE=1", NULL};
>
> WARNING: char * array declaration might be better as static const
> #43: FILE: arch/powerpc/kernel/eeh_driver.c:363:
> +       char *envp[] = {"EVENT=EEH_RESUME", "ONLINE=1", NULL};
>
>
>
Checkpatch is wrong it doesn't check the function that uses it, which only takes a char *

-Bryant

  reply	other threads:[~2017-12-18 18:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 15:32 [PATCH v1 0/7] SR-IOV Enablement on PowerVM Bryant G. Ly
2017-12-13 15:32 ` [PATCH v1 1/7] platform/pseries: Update VF config space after EEH Bryant G. Ly
2017-12-18  3:48   ` Alexey Kardashevskiy
2017-12-13 15:32 ` [PATCH v1 2/7] powerpc/kernel: Add uevents in EEH error/resume Bryant G. Ly
2017-12-18  3:54   ` Alexey Kardashevskiy
2017-12-18 18:45     ` Bryant G. Ly [this message]
2017-12-18  4:15   ` Russell Currey
2017-12-13 15:32 ` [PATCH v1 3/7] platforms/pseries: Set eeh_pe of EEH_PE_VF type Bryant G. Ly
2017-12-18  4:31   ` Russell Currey
2017-12-18  4:34   ` Alexey Kardashevskiy
2017-12-18 19:29     ` Juan Alvarez
2017-12-13 15:32 ` [PATCH v1 4/7] powerpc/kernel Add EEH operations to notify resume Bryant G. Ly
2017-12-18  4:29   ` Russell Currey
2017-12-18  5:02   ` Alexey Kardashevskiy
2017-12-18 19:29     ` Juan Alvarez
2017-12-13 15:32 ` [PATCH v1 5/7] powerpc/kernel: Add EEH notify resume sysfs Bryant G. Ly
2017-12-13 15:32 ` [PATCH v1 6/7] pseries/pci: Associate PEs to VFs in configure SR-IOV Bryant G. Ly
2017-12-18  6:16   ` Alexey Kardashevskiy
2017-12-13 15:32 ` [PATCH v1 7/7] pseries/setup: Add Initialization of VF Bars Bryant G. Ly
2017-12-18  7:21   ` Alexey Kardashevskiy
2017-12-18 19:29     ` Juan Alvarez
2017-12-19  6:38       ` Alexey Kardashevskiy
2017-12-21  3:04         ` Juan Alvarez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f316a133-6548-4ad2-1560-98c9d7b8f7f9@linux.vnet.ibm.com \
    --to=bryantly@linux.vnet.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=bodong@mellanox.com \
    --cc=eli@mellanox.com \
    --cc=helgaas@kernel.org \
    --cc=jjalvare@linux.vnet.ibm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=ruscur@russell.cc \
    --cc=saeedm@mellanox.com \
    --cc=seroyer@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).