Re: [PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range
I like this series overall, thanks! No objections from me. One thing I noted, though: On Fri, Apr 27, 2018 at 2:00 PM, Waiman Longwrote: > if (param->min && *param->min > val) { > if (clamp) { > val = *param->min; > + clamped = true; > } else { > return -EINVAL; > } This appears as a common bit of logic in many places in the series. It seems like it'd make sense to make this a helper of some kind? -Kees -- Kees Cook Pixel Security -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] VFIO: Fix Documentation
On Fri, 20 Apr 2018 18:07:27 +0800 "dongbo (E)"wrote: > From: Dong Bo > > Signed-off-by: Dong Bo > --- Hi Dong Bo, The patch is corrupted, please resend and also include a commit log, something as simple as "Update vfio_add_group_dev description to match the current API" would be fine. Thanks, Alex > Documentation/vfio.txt | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt > index ef6a511..f1a4d3c 100644 > --- a/Documentation/vfio.txt > +++ b/Documentation/vfio.txt > @@ -252,15 +252,14 @@ into VFIO core. When devices are bound and unbound to > the driver, > the driver should call vfio_add_group_dev() and vfio_del_group_dev() > respectively:: > -extern int vfio_add_group_dev(struct iommu_group *iommu_group, > - struct device *dev, > + extern int vfio_add_group_dev(struct device *dev, > const struct vfio_device_ops *ops, > void *device_data); > extern void *vfio_del_group_dev(struct device *dev); > vfio_add_group_dev() indicates to the core to begin tracking the > -specified iommu_group and register the specified dev as owned by > +iommu_group of the specified dev and register the dev as owned by > a VFIO bus driver. The driver provides an ops structure for callbacks > similar to a file operations structure:: > -- 1.9.1 > > > . > > -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH resend] VFS: simplify seq_file iteration code and interface
On Mon, 30 Apr 2018 11:50:04 +1000 NeilBrownwrote: > This patch simplifies the interface for first/next iteration and > simplifies the code, while maintaining complete backward > compatability. Now: > > - if ->start() is given a pos of zero, it should return an iterator > placed at the start of the sequence > - if ->start() is given a non-zero pos, it should return the iterator > in the same state it was after the last ->start or ->next. > > This is particularly useful for interators which walk the multiple > chains in a hash table, e.g. using rhashtable_walk*. See > fs/gfs2/glock.c and drivers/staging/lustre/lustre/llite/vvp_dev.c For the docs part: Acked-by: Jonathan Corbet jon -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 06/10] misc: pci_endpoint_test: Add MSI-X support
Hi Alan, On 30/04/2018 16:35, Alan Douglas wrote: > Hi Gustavo, > > On April 27, 2018, 4:57 p.m. Gustavo Pimentel wrote: >> Add MSI-X support and update driver documentation accordingly. >> >> Add new driver parameter to allow interruption type selection. >> >> Modify the Legacy/MSI/MSI-X test process, by: >> - Add and use a specific register located in a BAR, which defines the >> interrupt >> type is been triggered. >> - Move the interrupt ID number from the command section to a register >> located in a BAR. >> >> Signed-off-by: Gustavo Pimentel>> --- >> Documentation/misc-devices/pci-endpoint-test.txt | 3 + >> drivers/misc/pci_endpoint_test.c | 121 >> +++ >> drivers/pci/endpoint/functions/pci-epf-test.c| 78 +++ >> 3 files changed, 143 insertions(+), 59 deletions(-) >> > In testing these changes I found that pci_epc_raise_irq() also needs to be > updated in pci-epc-core.c, since it has interrupt_num parameter as u8 Yes, indeed. I updated it together with the pci-epc.h file. Thanks Alan, well spotted! Regards, Gustavo > > Thanks, > Alan > -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 06/10] misc: pci_endpoint_test: Add MSI-X support
Hi Gustavo, On April 27, 2018, 4:57 p.m. Gustavo Pimentel wrote: > Add MSI-X support and update driver documentation accordingly. > > Add new driver parameter to allow interruption type selection. > > Modify the Legacy/MSI/MSI-X test process, by: > - Add and use a specific register located in a BAR, which defines the > interrupt > type is been triggered. > - Move the interrupt ID number from the command section to a register > located in a BAR. > > Signed-off-by: Gustavo Pimentel> --- > Documentation/misc-devices/pci-endpoint-test.txt | 3 + > drivers/misc/pci_endpoint_test.c | 121 > +++ > drivers/pci/endpoint/functions/pci-epf-test.c| 78 +++ > 3 files changed, 143 insertions(+), 59 deletions(-) > In testing these changes I found that pci_epc_raise_irq() also needs to be updated in pci-epc-core.c, since it has interrupt_num parameter as u8 Thanks, Alan -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 1/9] pwm: core: Add support for PWM HW driver with pwm capture only
On Wed, Mar 21, 2018 at 10:10:36AM +0530, Rajkumar Rampelli wrote: > Add support for pwm HW driver which has only capture functionality. > This helps to implement the PWM based Tachometer driver which reads > the PWM output signals from electronic fans. > > PWM Tachometer captures the period and duty cycle of the PWM signal > > Add conditional checks for callabacks enable(), disable(), config() > to check if they are supported by the client driver or not. Skip these > callbacks if they are not supported. > > Signed-off-by: Rajkumar Rampelli> --- > > V2: Added if conditional checks for pwm callbacks since drivers may > implements only pwm capture functionality. > > drivers/pwm/core.c | 21 +++-- > 1 file changed, 15 insertions(+), 6 deletions(-) > > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c > index 1581f6a..f70fe68 100644 > --- a/drivers/pwm/core.c > +++ b/drivers/pwm/core.c > @@ -246,6 +246,10 @@ static bool pwm_ops_check(const struct pwm_ops *ops) > if (ops->apply) > return true; > > + /* driver supports capture operation */ > + if (ops->capture) > + return true; > + > return false; > } > > @@ -495,7 +499,8 @@ int pwm_apply_state(struct pwm_device *pwm, struct > pwm_state *state) >* ->apply(). >*/ > if (pwm->state.enabled) { > - pwm->chip->ops->disable(pwm->chip, pwm); > + if (pwm->chip->ops->disable) > + pwm->chip->ops->disable(pwm->chip, pwm); This is not a good idea. It means that you'll be able to successfully configure a capture-only PWM channel for output. I think all of the output configuration functions should return an error (-ENOSYS?) for capture-only devices, much like we return -ENOSYS for pwm_capture() if the driver doesn't implement capture support. Thierry signature.asc Description: PGP signature
Re: [PATCH v4 00/10] Add the I3C subsystem
Hi Greg, On Sun, 29 Apr 2018 15:36:42 +0200 Greg Kroah-Hartmanwrote: > On Mon, Apr 23, 2018 at 07:56:46PM +0200, Greg Kroah-Hartman wrote: > > On Mon, Apr 23, 2018 at 07:38:14PM +0200, Boris Brezillon wrote: > > > Hi, > > > > > > On Fri, 30 Mar 2018 09:47:41 +0200 > > > Boris Brezillon wrote: > > > > > > > This patch series is a proposal for a new I3C subsystem. > > > > > > This v4 has been sent almost a month ago and I didn't get any feedback > > > so far apart from Rob's R-b. Greg, is there any chance we can get these > > > patches merged in 4.18? If not, could you tell me what should be > > > addressed/improved/reworked? > > > > I'll look over it later this week, thanks. > > At first glance, it would be great to have at least one other > reviewed-by or signed-off-by on the main code here. I don't want to be > the only one to have to review it :) I understand. Arnd, Wolfram, any chance you could spend some time reviewing this patch series? I know Arnd is in vacation for the next few weeks, so I don't expect him to be able to do that immediately. Also, Wolfram stated that he didn't have time to review the series in details when I submitted the v1, I don't know if things have changed since then. Anyway, I'll keep searching for people to review the code. Regards, Boris -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 03/10] i3c: Add sysfs ABI spec
Hi Greg, On Sun, 29 Apr 2018 15:37:00 +0200 Greg Kroah-Hartmanwrote: > On Fri, Mar 30, 2018 at 09:47:44AM +0200, Boris Brezillon wrote: > > Document sysfs files/directories/symlinks exposed by the I3C subsystem. > > > > Signed-off-by: Boris Brezillon > > --- > > Changes in v2: > > - new patch > > --- > > Documentation/ABI/testing/sysfs-bus-i3c | 95 > > + > > 1 file changed, 95 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-bus-i3c > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-i3c > > b/Documentation/ABI/testing/sysfs-bus-i3c > > new file mode 100644 > > index ..5e88cc093e0e > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-bus-i3c > > @@ -0,0 +1,95 @@ > > +What: /sys/bus/i3c/devices/i3c- > > +KernelVersion: 4.16 > > Wrong kernel versions :) I'll fix that. Thanks, Boris -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html