Re: [PATCH] staging: greybus: fix checkpatch unsigned warnings

2017-01-16 Thread Johan Hovold
On Fri, Jan 13, 2017 at 09:54:51PM +0100, Roman Sommer wrote:
> Fix checkpatch warnings for parameter type unsigned in greybus.
> Note that this patch does not fix all checkpatch warnings for the
> affected files.

Thanks for the update. In the future, make sure to include a patch
revision in the Subject (e.g. "[PATCH v3] staging: ...") and a changelog
below the cut-off line ("---").

Funny that checkpatch warns about mentioning checkpatch in the Subject
line. Good thing ignoring checkpatch selectively is perfectly fine.

> Signed-off-by: Christian Bewermeyer 
> Signed-off-by: Roman Sommer 

Reviewed-by: Johan Hovold 

Thanks,
Johan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: media: bcm2048: style fix - bare use of unsigned

2017-01-16 Thread Greg KH
On Mon, Jan 16, 2017 at 06:06:25PM +1300, Derek Robson wrote:
> On Sun, Jan 15, 2017 at 10:40:02PM -0600, Scott Matheina wrote:
> > 
> > 
> > > On Jan 15, 2017, at 10:30 PM, Derek Robson  wrote:
> > > 
> > > Changed bare use of 'unsigned' to the prefered us of 'unsigned int'
> > > found using checkpatch
> > 
> > Just wondering if you compiled? This patch looks exactly like a patch I 
> > tried, but it didn't compile. 
> > 
> 
> It complied for me, I am on an X86 system.

I don't believe you, and kbuild backs that up  :)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V2] Staging: media: bcm2048: style fix - bare use of unsigned

2017-01-16 Thread Greg KH
On Mon, Jan 16, 2017 at 08:09:51PM +1300, Derek Robson wrote:
> Changed macro to not pass signedness and size as seprate fields.
> This is to improve code readablity.

Not really, it reads just fine as is.  In fact, it forces you to think
about the signed vs. unsigned of the variable and doesn't let you forget
it, which seems to be the intention of the code as-is.

So I would recommend just leaving it alone.

Remember, checkpatch is a hint, you always have to use your brain when
making kernel changes, and always test-build them :)

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: greybus: audio: Ensure proper byte order

2017-01-16 Thread Dan Carpenter
On Sat, Jan 14, 2017 at 11:17:07PM +0530, Vaibhav Agarwal wrote:
> @@ -656,13 +660,13 @@ static int gbaudio_tplg_create_enum_kctl(struct 
> gbaudio_module_info *gb,
>   gb_enum = &ctl->info.value.enumerated;
>  
>   /* since count=1, and reg is dummy */
> - gbe->max = gb_enum->items;
> + gbe->max = le32_to_cpu(gb_enum->items);
>   gbe->texts = gb_generate_enum_strings(gb, gb_enum);
>  
>   /* debug enum info */
>   dev_dbg(gb->dev, "Max:%d, name_length:%d\n", gb_enum->items,

This is printing little endian max.  Just use gbe->max here.

> -  gb_enum->names_length);
> - for (i = 0; i < gb_enum->items; i++)
> +  le16_to_cpu(gb_enum->names_length));
> + for (i = 0; i < le32_to_cpu(gb_enum->items); i++)

And here as well probably?

>   dev_dbg(gb->dev, "src[%d]: %s\n", i, gbe->texts[i]);
>  
>   *kctl = (struct snd_kcontrol_new)
> @@ -691,7 +695,7 @@ static int gbaudio_tplg_create_kcontrol(struct 
> gbaudio_module_info *gb,
>   if (!ctldata)
>   return -ENOMEM;
>   ctldata->ctl_id = ctl->id;
> - ctldata->data_cport = ctl->data_cport;
> + ctldata->data_cport = le16_to_cpu(ctl->data_cport);
>   ctldata->access = ctl->access;
>   ctldata->vcount = ctl->count_values;
>   ctldata->info = &ctl->info;
> @@ -865,12 +869,12 @@ static int gbaudio_tplg_create_enum_ctl(struct 
> gbaudio_module_info *gb,
>   gb_enum = &ctl->info.value.enumerated;
>  
>   /* since count=1, and reg is dummy */
> - gbe->max = gb_enum->items;
> + gbe->max = le32_to_cpu(gb_enum->items);
>   gbe->texts = gb_generate_enum_strings(gb, gb_enum);
>  
>   /* debug enum info */
>   dev_dbg(gb->dev, "Max:%d, name_length:%d\n", gb_enum->items,

Same.

> -  gb_enum->names_length);
> +  le16_to_cpu(gb_enum->names_length));
>   for (i = 0; i < gb_enum->items; i++)
^^
This one needs to be converted as well, I think.

>   dev_dbg(gb->dev, "src[%d]: %s\n", i, gbe->texts[i]);
>  

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: greybus: audio: Ensure proper byte order

2017-01-16 Thread Vaibhav Agarwal
On Mon, Jan 16, 2017 at 4:17 PM, Dan Carpenter  wrote:
> On Sat, Jan 14, 2017 at 11:17:07PM +0530, Vaibhav Agarwal wrote:
>> @@ -656,13 +660,13 @@ static int gbaudio_tplg_create_enum_kctl(struct 
>> gbaudio_module_info *gb,
>>   gb_enum = &ctl->info.value.enumerated;
>>
>>   /* since count=1, and reg is dummy */
>> - gbe->max = gb_enum->items;
>> + gbe->max = le32_to_cpu(gb_enum->items);
>>   gbe->texts = gb_generate_enum_strings(gb, gb_enum);
>>
>>   /* debug enum info */
>>   dev_dbg(gb->dev, "Max:%d, name_length:%d\n", gb_enum->items,
>
> This is printing little endian max.  Just use gbe->max here.

Yes, this makes more sense. I should have noticed this earlier :(
Surely, I'll include this one & other suggested changes in v2 series.
Thanks Dan :)

--
vaibhav
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 01/24] [media] dt-bindings: Add bindings for i.MX media driver

2017-01-16 Thread Philipp Zabel
On Fri, 2017-01-13 at 11:03 -0800, Steve Longerbeam wrote:
> 
> On 01/13/2017 03:55 AM, Philipp Zabel wrote:
> > Am Freitag, den 06.01.2017, 18:11 -0800 schrieb Steve Longerbeam:
> >> Add bindings documentation for the i.MX media driver.
> >>
> >> Signed-off-by: Steve Longerbeam 
> >> ---
> >>   Documentation/devicetree/bindings/media/imx.txt | 57 
> >> +
> >>   1 file changed, 57 insertions(+)
> >>   create mode 100644 Documentation/devicetree/bindings/media/imx.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/media/imx.txt 
> >> b/Documentation/devicetree/bindings/media/imx.txt
> >> new file mode 100644
> >> index 000..254b64a
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/media/imx.txt
> >> @@ -0,0 +1,57 @@
> >> +Freescale i.MX Media Video Devices
> >> +
> >> +Video Media Controller node
> >> +---
> >> +
> >> +This is the parent media controller node for video capture support.
> >> +
> >> +Required properties:
> >> +- compatible : "fsl,imx-media";
> > Would you be opposed to calling this "capture-subsystem" instead of
> > "imx-media"? We already use "fsl,imx-display-subsystem" and
> > "fsl,imx-gpu-subsystem" for the display and GPU compound devices.
> 
> sure. Some pie-in-the-sky day when DRM and media are unified,
> there could be a single device that handles them all,

Indeed :)

>  but for now
> I'm fine with "fsl,capture-subsystem".

Actually, I meant fsl,imx-capture-subsystem. fsl,imx-media-subsystem
would be fine, too. Either way, I'll be happy if it looks similar to the
other two.

[...]
> > This is a clever method to get better frame timestamps. Too bad about
> > the routing requirements. Can this be used on Nitrogen6X?
> 
> Absolutely, this support just needs use of the input-capture channels in the
> imx GPT. I still need to submit the patch to the imx-gpt driver that adds an
> input capture API, so at this point fsl,input-capture-channel has no effect,
> but it does work (tested on SabreAuto).

Nice.

[...]
> >> +Required properties:
> >> +- compatible  : "fsl,imx6-mipi-csi2";
> > I think this should get an additional "snps,dw-mipi-csi2" compatible,
> > since the only i.MX6 specific part is the bolted-on IPU2CSI gasket.
> 
> right, minus the gasket it's a Synopsys core. I'll add that compatible flag.
> Or should wait until the day this subdev is exported for general use, after
> pulling out the gasket specifics?

It can be added right away.

> >> +- reg   : physical base address and length of the register set;
> >> +- clocks  : the MIPI CSI-2 receiver requires three clocks: hsi_tx
> >> +  (the DPHY clock), video_27m, and eim_sel;
> > Note that hsi_tx is incorrectly named. CCGR3[CG8] just happens to be the
> > shared gate bit that gates the HSI clocks as well as the MIPI
> > "ac_clk_125m", "cfg_clk", "ips_clk", and "pll_refclk" inputs to the mipi
> > csi-2 core, but we are missing shared gate clocks in the clock tree for
> > these.
> 
> Yes, so many clocks for the MIPI core. Why so many? I would think
> there would need to be at most three: a clock for the MIPI CSI-2 core
> and HSI core, and a clock for the D-PHY (oh and maybe a clock for an
> M-PHY if there is one). I have no clue what all these other clocks are.
> But anyway, a single gating bit, CCGR3[CG8], seems to enable them all.

I would imagine the CSI-2 core has a high-speed clock input from the
D-PHY for serial input, an APB clock for register access (ips_clk), and
a pixel clock input for the parallel output (pixel_clk), at least.
The D-PHY will have a PLL reference input (pll_refclk?) and probably its
own register clock (cfg_clk?).

I've looked at the MIPI DSI chapter, and it looks like ac_clk_125m is
used for DSI only.

> > Both cfg_clk and pll_refclk are sourced from video_27m, so "cfg" ->
> > video_27m seems fine.
> > But I don't get "dphy".
> 
> I presume it's the clock for the D-PHY.
>
> >   Which input clock would that correspond to?
> > "pll_refclk?"
> 
> the mux at CDCDR says it comes from PLL3_120M, or PLL2_PFD2.

I think that makes sense.

regards
Philipp

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 06/24] ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors

2017-01-16 Thread Philipp Zabel
On Fri, 2017-01-13 at 15:04 -0800, Steve Longerbeam wrote:
>
> On 01/13/2017 04:03 AM, Philipp Zabel wrote:
> > Am Freitag, den 06.01.2017, 18:11 -0800 schrieb Steve Longerbeam:
> >> Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor.
> >> Both hang off the same i2c2 bus, so they require different (and non-
> >> default) i2c slave addresses.
> >>
> >> The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux.
> >>
> >> The OV5640 connects to the input port on the MIPI CSI-2 receiver on
> >> mipi_csi. It is set to transmit over MIPI virtual channel 1.
> >>
> >> Signed-off-by: Steve Longerbeam 
> >> ---
> >>   arch/arm/boot/dts/imx6dl-sabrelite.dts   |   5 ++
> >>   arch/arm/boot/dts/imx6q-sabrelite.dts|   6 ++
> >>   arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 118 
> >> +++
> >>   3 files changed, 129 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/imx6dl-sabrelite.dts 
> >> b/arch/arm/boot/dts/imx6dl-sabrelite.dts
> >> index 0f06ca5..fec2524 100644
> >> --- a/arch/arm/boot/dts/imx6dl-sabrelite.dts
> >> +++ b/arch/arm/boot/dts/imx6dl-sabrelite.dts
[...]
> >> @@ -299,6 +326,52 @@
> >>pinctrl-names = "default";
> >>pinctrl-0 = <&pinctrl_i2c2>;
> >>status = "okay";
> >> +
> >> +  ov5640: camera@40 {
> >> +  compatible = "ovti,ov5640";
> >> +  pinctrl-names = "default";
> >> +  pinctrl-0 = <&pinctrl_ov5640>;
> >> +  clocks = <&mipi_xclk>;
> >> +  clock-names = "xclk";
> >> +  reg = <0x40>;
> >> +  xclk = <2200>;
> > This is superfluous, you can use clk_get_rate on mipi_xclk.
> 
> This property is actually there to tell the driver what to set the
> rate to, with clk_set_rate(). So you are saying it would be better
> to set the rate in the device tree and the driver should only
> retrieve the rate?

Yes. Given that this is a reference clock input that is constant on a
given board and never changes during runtime, I think this is the
correct way. The clock will be fixed rate on most boards, I assume.

regards
Philipp

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 16/24] media: Add i.MX media core driver

2017-01-16 Thread Philipp Zabel
On Sat, 2017-01-14 at 14:46 -0800, Steve Longerbeam wrote:
[...]
> >> +Unprocessed Video Capture:
> >> +--
> >> +
> >> +Send frames directly from sensor to camera interface, with no
> >> +conversions:
> >> +
> >> +-> ipu_smfc -> camif
> > I'd call this capture interface, this is not just for cameras. Or maybe
> > idmac if you want to mirror hardware names?
> 
> Camif is so named because it is the V4L2 user interface for video
> capture. I suppose it could be named "capif", but that doesn't role
> off the tongue quite as well.

Agreed, capif sounds weird. I find camif a bit confusing though, because
Samsung S3C has a camera interface that is actually called "CAMIF".

> >> +Note the ipu_smfc can do pixel reordering within the same colorspace.
> > That isn't a feature of the SMFC, but of the IDMAC (FCW & FCR).
> 
> yes, the doc is re-worded to make that more clear.
> 
> >> +For example, its sink pad can take UYVY2X8, but its source pad can
> >> +output YUYV2X8.
> > I don't think this is correct. Re-reading "37.4.3.7 Packing to memory"
> > in the CSI chapter, for 8-bit per component data, the internal format
> > between CSI, SMFC, and IDMAC is always some 32-bit RGBx/YUVx variant
> > (or "bayer/generic data"). In either case, the internal format does not
> > change along the way.
> 
> these are pixels in memory buffers, not the IPU internal formats.

As long as we are talking about the CSI -> SMFC -> IDMAC path, these
should be IPU internal formats. How else would one choose between 8-bit
companded RGB, and 16-bit expanded RGB for a 10-bit per component input
signal? This is the same issue as in the next comment.

> >> +   media-ctl -V "\"camif0\":0 [fmt:UYVY2X8/640x480]"
> >> +   media-ctl -V "\"camif0\":1 [fmt:UYVY2X8/640x480]"
> >> +   # Configure pads for OV5640 pipeline
> >> +   media-ctl -V "\"ov5640_mipi 1-0040\":0 [fmt:UYVY2X8/640x480]"
> >> +   media-ctl -V "\"imx-mipi-csi2\":0 [fmt:UYVY2X8/640x480]"
> >> +   media-ctl -V "\"imx-mipi-csi2\":2 [fmt:UYVY2X8/640x480]"
> >> +   media-ctl -V "\"ipu1_csi1\":0 [fmt:UYVY2X8/640x480]"
> >> +   media-ctl -V "\"ipu1_csi1\":1 [fmt:UYVY2X8/640x480]"
> > [...]
> >> +   media-ctl -V "\"camif1\":0 [fmt:UYVY2X8/640x480]"
> > I agree this looks very intuitive, but technically correct for the
> > csi1:1 and camif1:0 pads would be a 32-bit YUV format.
> > (MEDIA_BUS_FMT_YUV8_1X32_PADLO doesn't exist yet).
> >
> > I think it would be better to use the correct format
> 
> I'm not sure I follow you here.

The ov5640 sends UYVY2X8 on the wire, so pads "ov5640_mipi 1-0040":0
up to "ipu1_csi1":0 are correct. But the CSI writes 32-bit YUV values
into the SMFC, so the CSI output pad and the IDMAC input pad should have
a YUV8_1X32 format.

Chapter 37.4.2.3 "FCW & FCR - Format converter write and read" in the
IDMAC chapter states that all internal submodules only work on 8-bit per
component formats with four components: YUVA or RGBA.

> > [...]
> > Is this a whole software buffer queue implementation? I thought the
> > whole point of putting the custom mem2mem framework into the capture
> > driver was to use the hardware FSU channel linking?
> 
>   see below.
> 
> > What is the purpose of this if the sink should be triggered by the FSU?
> 
> Ok, here is where I need to make an admission.
> 
> The only FSU links I have attempted (and which currently have entries
> in the fsu_link_info[] table), are the enc/vf/pp --> IRT links for rotation.

Which are not described as media entity links because the rotation units
do not have separate media entities. So me arguing against handling
mem2mem chaining via media entity links doesn't concern these implicit
links.

> There does not appear to be support in the FSU for linking a write channel
> to the VDIC read channels (8, 9, 10) according to VDI_SRC_SEL field. There
> is support for the direct link from CSI (which I am using), but that's 
> not an
> IDMAC channel link.
> 
> There is a PRP_SRC_SEL field, with linking from IDMAC (SMFC) channels
> 0..2 (and 3? it's not clear, and not clear whether this includes channel 1).

As I read it, that is 0 and 2 only, no idea why. But since there are
only 2 CSIs, that shouldn't be a problem.

> But I think this links to channel 12, and not to channels 8,9,10 to the 
> VDIC.
> Or will it? It's worth experimenting. It would have helped if FSL listed 
> which
> IDMAC channels these FSU links correspond to, instead of making us guess
> at it.

I would have assumed that the FSU triggering only works on 1:1 channels
and the VDIC with its three input channels is different. But then
there's the alleged VDOA link to ch8/9/10 ro ch9, depending on
VDI_MOT_SEL.

This makes me more convinced that the CSI -> VDIC link should only
describe the direct path (real-time mode, single field).

> In any event, the docs are not clear enough to implement a real FSU
> link to the VDIC read channels, if it's even possible. And trying to get
> programming help from FSL can be difficult, and no coding exam

[PATCH] staging: comedi: ni_pcimio: Support more PXI cards

2017-01-16 Thread Ian Abbott
Add support for NI PXI-6220, PXI-6221, PXI-6229, PXI-6250, PXI-6254,
PXI-6259, PXIe-6259, PXI-6280, PXI-6284, and PXI-6289 boards, treating
them the same as the correspondingly numbered PCI and PCIe boards (apart
from having different Comedi board name strings).  The same has
previously been done for other PXI boards supported by the driver.

The PCI device IDs for the newly supported boards come from the
"nixswv.inf" file in National Instrument's Windows drivers.

Also, sort `ni_pcimio_pci_table[]` by PCI device ID.  It is mostly
sorted already, so only the entries for PXI-6251 and PXIe-6251 need
moving.

Signed-off-by: Ian Abbott 
---
 drivers/staging/comedi/Kconfig |   8 +-
 drivers/staging/comedi/drivers/ni_pcimio.c | 173 +++--
 2 files changed, 167 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index e7255f811611..557ce96b4463 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -1070,9 +1070,11 @@ config COMEDI_NI_PCIMIO
  PCI-MIO-16E-4, PCI-6014, PCI-6040E, PXI-6040E, PCI-6030E, PCI-6031E,
  PCI-6032E, PCI-6033E, PCI-6071E, PCI-6023E, PCI-6024E, PCI-6025E,
  PXI-6025E, PCI-6034E, PCI-6035E, PCI-6052E, PCI-6110, PCI-6111,
- PCI-6220, PCI-6221, PCI-6224, PXI-6224, PCI-6225, PXI-6225, PCI-6229,
- PCI-6250, PCI-6251, PCIe-6251, PCI-6254, PCI-6259, PCIe-6259,
- PCI-6280, PCI-6281, PXI-6281, PCI-6284, PCI-6289, PCI-6711, PXI-6711,
+ PCI-6220, PXI-6220, PCI-6221, PXI-6221, PCI-6224, PXI-6224, PCI-6225,
+ PXI-6225, PCI-6229, PXI-6229, PCI-6250, PXI-6250, PCI-6251, PXI-6251,
+ PCIe-6251, PXIe-6251, PCI-6254, PXI-6254, PCI-6259, PXI-6259,
+ PCIe-6259, PXIe-6259, PCI-6280, PXI-6280, PCI-6281, PXI-6281,
+ PCI-6284, PXI-6284, PCI-6289, PXI-6289, PCI-6711, PXI-6711,
  PCI-6713, PXI-6713, PXI-6071E, PCI-6070E, PXI-6070E, PXI-6052E,
  PCI-6036E, PCI-6731, PCI-6733, PXI-6733, PCI-6143, PXI-6143
 
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c 
b/drivers/staging/comedi/drivers/ni_pcimio.c
index f13a2f7360b3..cdb66eab1292 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -25,17 +25,16 @@
  *   PCI-MIO-16XE-10, PXI-6030E, PCI-MIO-16E-1, PCI-MIO-16E-4, PCI-6014,
  *   PCI-6040E, PXI-6040E, PCI-6030E, PCI-6031E, PCI-6032E, PCI-6033E,
  *   PCI-6071E, PCI-6023E, PCI-6024E, PCI-6025E, PXI-6025E, PCI-6034E,
- *   PCI-6035E, PCI-6052E,
- *   PCI-6110, PCI-6111, PCI-6220, PCI-6221, PCI-6224, PXI-6224,
- *   PCI-6225, PXI-6225, PCI-6229, PCI-6250,
- *   PCI-6251, PXI-6251, PCIe-6251, PXIe-6251,
- *   PCI-6254, PCI-6259, PCIe-6259,
- *   PCI-6280, PCI-6281, PXI-6281, PCI-6284, PCI-6289,
- *   PCI-6711, PXI-6711, PCI-6713, PXI-6713,
- *   PXI-6071E, PCI-6070E, PXI-6070E,
+ *   PCI-6035E, PCI-6052E, PCI-6110, PCI-6111, PCI-6220, PXI-6220,
+ *   PCI-6221, PXI-6221, PCI-6224, PXI-6224, PCI-6225, PXI-6225,
+ *   PCI-6229, PXI-6229, PCI-6250, PXI-6250, PCI-6251, PXI-6251,
+ *   PCIe-6251, PXIe-6251, PCI-6254, PXI-6254, PCI-6259, PXI-6259,
+ *   PCIe-6259, PXIe-6259, PCI-6280, PXI-6280, PCI-6281, PXI-6281,
+ *   PCI-6284, PXI-6284, PCI-6289, PXI-6289, PCI-6711, PXI-6711,
+ *   PCI-6713, PXI-6713, PXI-6071E, PCI-6070E, PXI-6070E,
  *   PXI-6052E, PCI-6036E, PCI-6731, PCI-6733, PXI-6733,
  *   PCI-6143, PXI-6143
- * Updated: Mon, 09 Jan 2012 14:52:48 +
+ * Updated: Mon, 16 Jan 2017 12:56:04 +
  *
  * These boards are almost identical to the AT-MIO E series, except that
  * they use the PCI bus instead of ISA (i.e., AT). See the notes for the
@@ -181,26 +180,36 @@ enum ni_pcimio_boardid {
BOARD_PXI6031E,
BOARD_PCI6036E,
BOARD_PCI6220,
+   BOARD_PXI6220,
BOARD_PCI6221,
BOARD_PCI6221_37PIN,
+   BOARD_PXI6221,
BOARD_PCI6224,
BOARD_PXI6224,
BOARD_PCI6225,
BOARD_PXI6225,
BOARD_PCI6229,
+   BOARD_PXI6229,
BOARD_PCI6250,
+   BOARD_PXI6250,
BOARD_PCI6251,
BOARD_PXI6251,
BOARD_PCIE6251,
BOARD_PXIE6251,
BOARD_PCI6254,
+   BOARD_PXI6254,
BOARD_PCI6259,
+   BOARD_PXI6259,
BOARD_PCIE6259,
+   BOARD_PXIE6259,
BOARD_PCI6280,
+   BOARD_PXI6280,
BOARD_PCI6281,
BOARD_PXI6281,
BOARD_PCI6284,
+   BOARD_PXI6284,
BOARD_PCI6289,
+   BOARD_PXI6289,
BOARD_PCI6143,
BOARD_PXI6143,
 };
@@ -684,6 +693,16 @@ static const struct ni_board_struct ni_boards[] = {
.reg_type   = ni_reg_622x,
.caldac = { caldac_none },
},
+   [BOARD_PXI6220] = {
+   .name   = "pxi-6220",
+   .n_adchan   = 16,
+   .ai_maxdata = 0x,
+   .ai_fifo_depth  = 512,  /* FIXME: guess */
+   .gainlkup   = ai_gain_622x,

[PATCH] staging: comedi: ni_660x: Support PCI-6224

2017-01-16 Thread Ian Abbott
Add support for the NI PCI-6224 board, assuming it behaves like the NI
PXI-6224 board at the register level.

The PCI device ID comes from the "nitiowv.inf" file in National
Instrument's Windows drivers.

Signed-off-by: Ian Abbott 
---
 drivers/staging/comedi/Kconfig   |  2 +-
 drivers/staging/comedi/drivers/ni_660x.c | 10 --
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index e7255f811611..4c22e2caa75e 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -1025,7 +1025,7 @@ config COMEDI_NI_660X
select COMEDI_NI_TIOCMD
---help---
  Enable support for National Instruments PCI-6601 (ni_660x), PCI-6602,
- PXI-6602, PXI-6608 and PXI-6624.
+ PXI-6602, PXI-6608, PCI-6624, and PXI-6624.
 
  To compile this driver as a module, choose M here: the module will be
  called ni_660x.
diff --git a/drivers/staging/comedi/drivers/ni_660x.c 
b/drivers/staging/comedi/drivers/ni_660x.c
index 0dcb826a9f1f..6aa755ad3953 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -16,13 +16,13 @@
  * Driver: ni_660x
  * Description: National Instruments 660x counter/timer boards
  * Devices: [National Instruments] PCI-6601 (ni_660x), PCI-6602, PXI-6602,
- *   PXI-6608, PXI-6624
+ *   PXI-6608, PCI-6624, PXI-6624
  * Author: J.P. Mellor ,
  *   herman.bruynin...@mech.kuleuven.ac.be,
  *   wim.meeus...@mech.kuleuven.ac.be,
  *   klaas.gade...@mech.kuleuven.ac.be,
  *   Frank Mori Hess 
- * Updated: Fri, 15 Mar 2013 10:47:56 +
+ * Updated: Mon, 16 Jan 2017 14:00:43 +
  * Status: experimental
  *
  * Encoders work.  PulseGeneration (both single pulse and pulse train)
@@ -211,6 +211,7 @@ enum ni_660x_boardid {
BOARD_PCI6602,
BOARD_PXI6602,
BOARD_PXI6608,
+   BOARD_PCI6624,
BOARD_PXI6624
 };
 
@@ -236,6 +237,10 @@ static const struct ni_660x_board ni_660x_boards[] = {
.name   = "PXI-6608",
.n_chips= 2,
},
+   [BOARD_PCI6624] = {
+   .name   = "PCI-6624",
+   .n_chips= 2,
+   },
[BOARD_PXI6624] = {
.name   = "PXI-6624",
.n_chips= 2,
@@ -920,6 +925,7 @@ static const struct pci_device_id ni_660x_pci_table[] = {
{ PCI_VDEVICE(NI, 0x1360), BOARD_PXI6602 },
{ PCI_VDEVICE(NI, 0x2c60), BOARD_PCI6601 },
{ PCI_VDEVICE(NI, 0x2cc0), BOARD_PXI6608 },
+   { PCI_VDEVICE(NI, 0x1e30), BOARD_PCI6624 },
{ PCI_VDEVICE(NI, 0x1e40), BOARD_PXI6624 },
{ 0 }
 };
-- 
2.11.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 17/24] media: imx: Add CSI subdev driver

2017-01-16 Thread Philipp Zabel
On Fri, 2017-01-06 at 18:11 -0800, Steve Longerbeam wrote:
> This is a media entity subdevice for the i.MX Camera
> Serial Interface module.

s/Serial/Sensor/

> Signed-off-by: Steve Longerbeam 
> ---
>  drivers/staging/media/imx/Kconfig   |  13 +
>  drivers/staging/media/imx/Makefile  |   2 +
>  drivers/staging/media/imx/imx-csi.c | 644 
> 
>  3 files changed, 659 insertions(+)
>  create mode 100644 drivers/staging/media/imx/imx-csi.c
> 
> diff --git a/drivers/staging/media/imx/Kconfig 
> b/drivers/staging/media/imx/Kconfig
> index bfde58d..ce2d2c8 100644
> --- a/drivers/staging/media/imx/Kconfig
> +++ b/drivers/staging/media/imx/Kconfig
> @@ -6,3 +6,16 @@ config VIDEO_IMX_MEDIA
> Say yes here to enable support for video4linux media controller
> driver for the i.MX5/6 SOC.
>  
> +if VIDEO_IMX_MEDIA
> +menu "i.MX5/6 Media Sub devices"
> +
> +config VIDEO_IMX_CAMERA

s/CAMERA/CSI/ ?

> + tristate "i.MX5/6 Camera driver"

i.MX5/6 Camera Sensor Interface driver

> + depends on VIDEO_IMX_MEDIA && VIDEO_DEV && I2C
> + select VIDEOBUF2_DMA_CONTIG
> + default y
> + ---help---
> +   A video4linux camera capture driver for i.MX5/6.
> +
> +endmenu
> +endif
> diff --git a/drivers/staging/media/imx/Makefile 
> b/drivers/staging/media/imx/Makefile
> index ef9f11b..133672a 100644
> --- a/drivers/staging/media/imx/Makefile
> +++ b/drivers/staging/media/imx/Makefile
> @@ -4,3 +4,5 @@ imx-media-objs := imx-media-dev.o imx-media-fim.o 
> imx-media-internal-sd.o \
>  obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx-media.o
>  obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx-media-common.o
>  
> +obj-$(CONFIG_VIDEO_IMX_CAMERA) += imx-csi.o
> +
> diff --git a/drivers/staging/media/imx/imx-csi.c 
> b/drivers/staging/media/imx/imx-csi.c
> new file mode 100644
> index 000..64ef862
> --- /dev/null
> +++ b/drivers/staging/media/imx/imx-csi.c
> @@ -0,0 +1,644 @@
> +/*
> + * V4L2 Capture CSI Subdev for Freescale i.MX5/6 SOC
> + *
> + * Copyright (c) 2014-2016 Mentor Graphics Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include "imx-media.h"
> +
> +#define CSI_NUM_PADS 2
> +
> +struct csi_priv {
> + struct device *dev;
> + struct ipu_soc *ipu;
> + struct imx_media_dev *md;
> + struct v4l2_subdev sd;
> + struct media_pad pad[CSI_NUM_PADS];
> + struct v4l2_mbus_framefmt format_mbus[CSI_NUM_PADS];
> + struct v4l2_mbus_config sensor_mbus_cfg;
> + struct v4l2_rect crop;
> + struct ipu_csi *csi;
> + int csi_id;
> + int input_pad;
> + int output_pad;
> + bool power_on;  /* power is on */
> + bool stream_on; /* streaming is on */
> +
> + /* the sink for the captured frames */
> + struct v4l2_subdev *sink_sd;
> + enum ipu_csi_dest dest;
> + struct v4l2_subdev *src_sd;

src_sd is not used except that its presence marks an enabled input link.
-> could be changed to bool.

> + struct v4l2_ctrl_handler ctrl_hdlr;
> + struct imx_media_fim *fim;
> +
> + /* the attached sensor at stream on */
> + struct imx_media_subdev *sensor;
> +};
> +
> +static inline struct csi_priv *sd_to_dev(struct v4l2_subdev *sdev)
> +{
> + return container_of(sdev, struct csi_priv, sd);
> +}
> +
> +/* Update the CSI whole sensor and active windows */
> +static int csi_setup(struct csi_priv *priv)
> +{
> + struct v4l2_mbus_framefmt infmt;
> +
> + ipu_csi_set_window(priv->csi, &priv->crop);
> +
> + /*
> +  * the ipu-csi doesn't understand ALTERNATE, but it only
> +  * needs to know whether the stream is interlaced, so set
> +  * to INTERLACED if infmt field is ALTERNATE.
> +  */
> + infmt = priv->format_mbus[priv->input_pad];
> + if (infmt.field == V4L2_FIELD_ALTERNATE)
> + infmt.field = V4L2_FIELD_INTERLACED;

That should be SEQ_TB/BT depending on video standard.

> + ipu_csi_init_interface(priv->csi, &priv->sensor_mbus_cfg, &infmt);
> +
> + ipu_csi_set_dest(priv->csi, priv->dest);
> +
> + ipu_csi_dump(priv->csi);
> +
> + return 0;
> +}
> +
> +static int csi_start(struct csi_priv *priv)
> +{
> + int ret;
> +
> + if (!priv->sensor) {
> + v4l2_err(&priv->sd, "no sensor attached\n");
> + return -EINVAL;
> + }
> +
> + ret = csi_setup(priv);
> + if (ret)
> + return ret;
> +
> + /* start the frame interval monitor */
> + if (priv->fim) {
> + ret = imx_media_fim_set_stream(priv->fim, priv->sensor, true);
> + if (ret)
> + return ret;
> + }
> +
> + ret = ipu_csi_enable(priv->csi);
> + if (ret) {
> + v4l2_err

Re: [PATCH v3 06/24] ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors

2017-01-16 Thread Steve Longerbeam



On 01/16/2017 04:55 AM, Philipp Zabel wrote:

On Fri, 2017-01-13 at 15:04 -0800, Steve Longerbeam wrote:


@@ -299,6 +326,52 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
+
+   ov5640: camera@40 {
+   compatible = "ovti,ov5640";
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_ov5640>;
+   clocks = <&mipi_xclk>;
+   clock-names = "xclk";
+   reg = <0x40>;
+   xclk = <2200>;

This is superfluous, you can use clk_get_rate on mipi_xclk.

This property is actually there to tell the driver what to set the
rate to, with clk_set_rate(). So you are saying it would be better
to set the rate in the device tree and the driver should only
retrieve the rate?

Yes. Given that this is a reference clock input that is constant on a
given board and never changes during runtime, I think this is the
correct way. The clock will be fixed rate on most boards, I assume.


Ok, that makes sense, I'll make that change.

Steve

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: unisys: visorbus: fix checkpatch block comments warning

2017-01-16 Thread Abdul Rauf
Fix the following warnings:
Block comments should align the * on each line

Signed-off-by: Abdul Rauf 
---
Please ignore my previous two patches in staging: unisys.
This is the combined patch of those two patches
---
 drivers/staging/unisys/visorbus/visorchipset.c| 2 +-
 drivers/staging/unisys/visorbus/vmcallinterface.h | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c 
b/drivers/staging/unisys/visorbus/visorchipset.c
index 336af52d43d7..4e630ea527e8 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1409,7 +1409,7 @@ parahotplug_process_message(struct controlvm_message 
*inmsg)
 *
 * devices are automatically enabled at
 * initialization.
-   */
+*/
parahotplug_request_kickoff(req);
controlvm_respond_physdev_changestate
(&inmsg->hdr,
diff --git a/drivers/staging/unisys/visorbus/vmcallinterface.h 
b/drivers/staging/unisys/visorbus/vmcallinterface.h
index 674a88b657d3..d1d72c184e29 100644
--- a/drivers/staging/unisys/visorbus/vmcallinterface.h
+++ b/drivers/staging/unisys/visorbus/vmcallinterface.h
@@ -16,10 +16,10 @@
 #define __IOMONINTF_H__
 
 /*
-* This file contains all structures needed to support the VMCALLs for IO
-* Virtualization.  The VMCALLs are provided by Monitor and used by IO code
-* running on IO Partitions.
-*/
+ * This file contains all structures needed to support the VMCALLs for IO
+ * Virtualization.  The VMCALLs are provided by Monitor and used by IO code
+ * running on IO Partitions.
+ */
 static inline unsigned long
 __unisys_vmcall_gnuc(unsigned long tuple, unsigned long reg_ebx,
 unsigned long reg_ecx)
-- 
2.11.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 01/24] [media] dt-bindings: Add bindings for i.MX media driver

2017-01-16 Thread Steve Longerbeam



On 01/16/2017 04:09 AM, Philipp Zabel wrote:

On Fri, 2017-01-13 at 11:03 -0800, Steve Longerbeam wrote:

On 01/13/2017 03:55 AM, Philipp Zabel wrote:

Am Freitag, den 06.01.2017, 18:11 -0800 schrieb Steve Longerbeam:

Add bindings documentation for the i.MX media driver.

Signed-off-by: Steve Longerbeam 
---
   Documentation/devicetree/bindings/media/imx.txt | 57 
+
   1 file changed, 57 insertions(+)
   create mode 100644 Documentation/devicetree/bindings/media/imx.txt

diff --git a/Documentation/devicetree/bindings/media/imx.txt 
b/Documentation/devicetree/bindings/media/imx.txt
new file mode 100644
index 000..254b64a
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/imx.txt
@@ -0,0 +1,57 @@
+Freescale i.MX Media Video Devices
+
+Video Media Controller node
+---
+
+This is the parent media controller node for video capture support.
+
+Required properties:
+- compatible : "fsl,imx-media";

Would you be opposed to calling this "capture-subsystem" instead of
"imx-media"? We already use "fsl,imx-display-subsystem" and
"fsl,imx-gpu-subsystem" for the display and GPU compound devices.

sure. Some pie-in-the-sky day when DRM and media are unified,
there could be a single device that handles them all,

Indeed :)


  but for now
I'm fine with "fsl,capture-subsystem".

Actually, I meant fsl,imx-capture-subsystem.


right, I caught my error and that is the name chosen.


  fsl,imx-media-subsystem
would be fine, too. Either way, I'll be happy if it looks similar to the
other two.

[...]

This is a clever method to get better frame timestamps. Too bad about
the routing requirements. Can this be used on Nitrogen6X?

Absolutely, this support just needs use of the input-capture channels in the
imx GPT. I still need to submit the patch to the imx-gpt driver that adds an
input capture API, so at this point fsl,input-capture-channel has no effect,
but it does work (tested on SabreAuto).

Nice.

[...]

+Required properties:
+- compatible   : "fsl,imx6-mipi-csi2";

I think this should get an additional "snps,dw-mipi-csi2" compatible,
since the only i.MX6 specific part is the bolted-on IPU2CSI gasket.

right, minus the gasket it's a Synopsys core. I'll add that compatible flag.
Or should wait until the day this subdev is exported for general use, after
pulling out the gasket specifics?

It can be added right away.


ok, I will add.

Steve




+- reg   : physical base address and length of the register set;
+- clocks   : the MIPI CSI-2 receiver requires three clocks: hsi_tx
+  (the DPHY clock), video_27m, and eim_sel;

Note that hsi_tx is incorrectly named. CCGR3[CG8] just happens to be the
shared gate bit that gates the HSI clocks as well as the MIPI
"ac_clk_125m", "cfg_clk", "ips_clk", and "pll_refclk" inputs to the mipi
csi-2 core, but we are missing shared gate clocks in the clock tree for
these.

Yes, so many clocks for the MIPI core. Why so many? I would think
there would need to be at most three: a clock for the MIPI CSI-2 core
and HSI core, and a clock for the D-PHY (oh and maybe a clock for an
M-PHY if there is one). I have no clue what all these other clocks are.
But anyway, a single gating bit, CCGR3[CG8], seems to enable them all.

I would imagine the CSI-2 core has a high-speed clock input from the
D-PHY for serial input, an APB clock for register access (ips_clk), and
a pixel clock input for the parallel output (pixel_clk), at least.
The D-PHY will have a PLL reference input (pll_refclk?) and probably its
own register clock (cfg_clk?).

I've looked at the MIPI DSI chapter, and it looks like ac_clk_125m is
used for DSI only.


Both cfg_clk and pll_refclk are sourced from video_27m, so "cfg" ->
video_27m seems fine.
But I don't get "dphy".

I presume it's the clock for the D-PHY.


   Which input clock would that correspond to?
"pll_refclk?"

the mux at CDCDR says it comes from PLL3_120M, or PLL2_PFD2.

I think that makes sense.

regards
Philipp



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-16 Thread Thomas Gleixner
On Fri, 13 Jan 2017, Vitaly Kuznetsov wrote:
> With TimeSync version 4 protocol support we started updating system time
> continuously through the whole lifetime of Hyper-V guests. Every 5 seconds
> there is a time sample from the host which triggers do_settimeofday[64]().
> While the time from the host is very accurate such adjustments may cause
> issues:
> - Time is jumping forward and backward, some applications may misbehave.
> - In case an NTP server runs in parallel and uses something else for time
>   sync (network, PTP,...) system time will never converge.
> - Systemd starts annoying you by printing "Time has been changed" every 5
>   seconds to the system log.
> 
> Instead of doing in-kernel time adjustments offload the work to an
> NTP client by exposing TimeSync messages as a PTP device. Users my now
> decide what they want to use as a source.
> 
> I tested the solution with chrony, the config was:
> 
>  refclock PHC /dev/ptp0 poll 3 precision 1e-9
> 
> The result I'm seeing is accurate enough, the time delta between the guest
> and the host is almost always within [-10us, +10us], the in-kernel solution
> was giving us comparable results.
> 
> I also tried implementing PPS device instead of PTP by using not currently
> used Hyper-V synthetic timers (we use only one of four for clockevent) but
> with PPS source only chrony wasn't able to give me the required accuracy,
> the delta often more that 100us.

Makes sense. The PTP based solution is really nice!

>  static void hv_set_host_time(struct work_struct *work)
>  {
>   struct adj_time_work*wrk;
> - s64 host_tns;
>   u64 newtime;
>   struct timespec64 host_ts;

Just a nitpick. Ordering variables in reverse fir tree (length) order:

struct adj_time_work *wrk;
struct timespec64 host_ts;
u64 newtime;

makes is simpler to parse

> +
> +static struct {
> + u64 host_time;
> + u64 ref_time;
> + spinlock_t lock;
> +} host_ts;

Another formatting nit. If you arrange the members in tabular fashion it
becomes simpler to parse:

static struct {
u64 host_time;
u64 ref_time;
spinlock_t  lock;
} host_ts;

Also the struct might do with some comment explaning that it is the storage
for the PTP machinery,

> +static inline void adj_guesttime(u64 hosttime, u64 reftime, u8 adj_flags)
>  {
> + unsigned long flags;
>  
>   /*
>* This check is safe since we are executing in the
>* interrupt context and time synch messages arre always
>* delivered on the same CPU.
>*/
> - if (work_pending(&wrk.work))
> - return;
> + if (adj_flags & ICTIMESYNCFLAG_SYNC) {
> + if (work_pending(&wrk.work))
> + return;
>  
> - wrk.host_time = hosttime;
> - wrk.ref_time = reftime;
> - wrk.flags = flags;
> - if ((flags & (ICTIMESYNCFLAG_SYNC | ICTIMESYNCFLAG_SAMPLE)) != 0) {
> + wrk.host_time = hosttime;
> + wrk.ref_time = reftime;
> + wrk.flags = adj_flags;
>   schedule_work(&wrk.work);
> + } else {
> + spin_lock_irqsave(&host_ts.lock, flags);
> + host_ts.host_time = hosttime;
> +
> + if (ts_srv_version <= TS_VERSION_3)
> + rdmsrl(HV_X64_MSR_TIME_REF_COUNT, host_ts.ref_time);

I'm confused here. The reftime / hosttime pair is accurate at sampling time
on the host. So why reading the MSR here? I'm certainly missing something,
but then this wants to have a comment like the other one in
get_timeadj_latency().

> + else
> + host_ts.ref_time = reftime;
> + spin_unlock_irqrestore(&host_ts.lock, flags);
>   }
>  }

Other than that: Nice work!

Thanks,

tglx
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 17/24] media: imx: Add CSI subdev driver

2017-01-16 Thread Steve Longerbeam



On 01/16/2017 07:03 AM, Philipp Zabel wrote:

On Fri, 2017-01-06 at 18:11 -0800, Steve Longerbeam wrote:

This is a media entity subdevice for the i.MX Camera
Serial Interface module.

s/Serial/Sensor/


done.


Signed-off-by: Steve Longerbeam 
---
  drivers/staging/media/imx/Kconfig   |  13 +
  drivers/staging/media/imx/Makefile  |   2 +
  drivers/staging/media/imx/imx-csi.c | 644 
  3 files changed, 659 insertions(+)
  create mode 100644 drivers/staging/media/imx/imx-csi.c

diff --git a/drivers/staging/media/imx/Kconfig 
b/drivers/staging/media/imx/Kconfig
index bfde58d..ce2d2c8 100644
--- a/drivers/staging/media/imx/Kconfig
+++ b/drivers/staging/media/imx/Kconfig
@@ -6,3 +6,16 @@ config VIDEO_IMX_MEDIA
  Say yes here to enable support for video4linux media controller
  driver for the i.MX5/6 SOC.
  
+if VIDEO_IMX_MEDIA

+menu "i.MX5/6 Media Sub devices"
+
+config VIDEO_IMX_CAMERA

s/CAMERA/CSI/ ?


done.


+   tristate "i.MX5/6 Camera driver"

i.MX5/6 Camera Sensor Interface driver


done.




+
+struct csi_priv {
+   struct device *dev;
+   struct ipu_soc *ipu;
+   struct imx_media_dev *md;
+   struct v4l2_subdev sd;
+   struct media_pad pad[CSI_NUM_PADS];
+   struct v4l2_mbus_framefmt format_mbus[CSI_NUM_PADS];
+   struct v4l2_mbus_config sensor_mbus_cfg;
+   struct v4l2_rect crop;
+   struct ipu_csi *csi;
+   int csi_id;
+   int input_pad;
+   int output_pad;
+   bool power_on;  /* power is on */
+   bool stream_on; /* streaming is on */
+
+   /* the sink for the captured frames */
+   struct v4l2_subdev *sink_sd;
+   enum ipu_csi_dest dest;
+   struct v4l2_subdev *src_sd;

src_sd is not used except that its presence marks an enabled input link.
-> could be changed to bool.


For now I prefer to keep it a pointer to the src/sink subdevs.
At some point the CSI may have some reason to know the
identity of the source.




+   struct v4l2_ctrl_handler ctrl_hdlr;
+   struct imx_media_fim *fim;
+
+   /* the attached sensor at stream on */
+   struct imx_media_subdev *sensor;
+};
+
+static inline struct csi_priv *sd_to_dev(struct v4l2_subdev *sdev)
+{
+   return container_of(sdev, struct csi_priv, sd);
+}
+
+/* Update the CSI whole sensor and active windows */
+static int csi_setup(struct csi_priv *priv)
+{
+   struct v4l2_mbus_framefmt infmt;
+
+   ipu_csi_set_window(priv->csi, &priv->crop);
+
+   /*
+* the ipu-csi doesn't understand ALTERNATE, but it only
+* needs to know whether the stream is interlaced, so set
+* to INTERLACED if infmt field is ALTERNATE.
+*/
+   infmt = priv->format_mbus[priv->input_pad];
+   if (infmt.field == V4L2_FIELD_ALTERNATE)
+   infmt.field = V4L2_FIELD_INTERLACED;

That should be SEQ_TB/BT depending on video standard.


fixed.


+
+static int csi_s_stream(struct v4l2_subdev *sd, int enable)
+{
+   struct csi_priv *priv = v4l2_get_subdevdata(sd);
+   int ret = 0;
+
+   if (!priv->src_sd || !priv->sink_sd)
+   return -EPIPE;
+
+   v4l2_info(sd, "stream %s\n", enable ? "ON" : "OFF");

These could be silenced a bit.


yeah, I think it is time for that. I've silenced all the
v4l2_info()'s for stream on/off, power on/off, as well
as some others.




+static int csi_s_power(struct v4l2_subdev *sd, int on)
+{
+   struct csi_priv *priv = v4l2_get_subdevdata(sd);
+   int ret = 0;
+
+   v4l2_info(sd, "power %s\n", on ? "ON" : "OFF");
+
+   if (priv->fim && on != priv->power_on)
+   ret = imx_media_fim_set_power(priv->fim, on);
+
+   if (!ret)
+   priv->power_on = on;
+   return ret;
+}

Is this called multiple times? I'd expect a poweron during open and a
poweroff during close, so no need for priv->power_on.


It is actually called multiple times. The s_power subdev callbacks are
made every time there is a new link established, in the imx-media core's
link_notify(), in order to re-establish power to the active subdevs in the
new pipeline.

This might change after I look into using v4l2_pipeline_pm_use().




+static int csi_link_setup(struct media_entity *entity,
+ const struct media_pad *local,
+ const struct media_pad *remote, u32 flags)
+{
+   struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
+   struct csi_priv *priv = v4l2_get_subdevdata(sd);
+   struct v4l2_subdev *remote_sd;
+
+   dev_dbg(priv->dev, "link setup %s -> %s", remote->entity->name,
+   local->entity->name);
+
+   remote_sd = media_entity_to_v4l2_subdev(remote->entity);
+
+   if (local->flags & MEDIA_PAD_FL_SINK) {
+   if (flags & MEDIA_LNK_FL_ENABLED) {
+   if (priv->src_sd)
+   return -EBUSY;
+   priv->src_sd = remote_sd;
+   } else {
+

Re: [PATCH] staging: lustre: headers: potential UAPI headers

2017-01-16 Thread James Simmons

> On Mon, Dec 19, 2016 at 12:06:47PM -0500, James Simmons wrote:
> > Not for landing. This is the purposed UAPI headers
> > with the removal of unlikely and debugging macros.
> > This is just for feedback to see if this is acceptable
> > for the upstream client.
> > 
> > Signed-off-by: James Simmons 
> > ---
> >  .../lustre/lustre/include/lustre/lustre_fid.h  | 353 
> > +
> >  .../lustre/lustre/include/lustre/lustre_ostid.h| 233 ++
> 
> Can you make a lustre "uapi" directory so we can see which files you
> really want to be UAPI and which you don't as time goes on?

Where do you want them placed? In uapi/linux/lustre or uapi/lustre. Does
it matter to you? The below was to forth coming UAPI headers which from
your response you seem okay with in general.
 
> >  2 files changed, 586 insertions(+)
> >  create mode 100644 
> > drivers/staging/lustre/lustre/include/lustre/lustre_fid.h
> >  create mode 100644 
> > drivers/staging/lustre/lustre/include/lustre/lustre_ostid.h
> > 
> > diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_fid.h 
> > b/drivers/staging/lustre/lustre/include/lustre/lustre_fid.h
> > new file mode 100644
> > index 000..cb6afa5
> > --- /dev/null
> > +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_fid.h
> > @@ -0,0 +1,353 @@
> > +/*
> > + * GPL HEADER START
> > + *
> > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 only,
> > + * as published by the Free Software Foundation.
> > + *
> > + * This program is distributed in the hope that it will be useful, but
> > + * WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > + * General Public License version 2 for more details (a copy is included
> > + * in the LICENSE file that accompanied this code).
> > + *
> > + * You should have received a copy of the GNU General Public License
> > + * version 2 along with this program; If not, see
> > + * http://www.gnu.org/licenses/gpl-2.0.html
> > + *
> > + * GPL HEADER END
> > + */
> > +/*
> > + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights 
> > reserved.
> > + * Use is subject to license terms.
> > + *
> > + * Copyright (c) 2011, 2014, Intel Corporation.
> > + *
> > + * Copyright 2016 Cray Inc, all rights reserved.
> > + * Author: Ben Evans.
> > + *
> > + * all fid manipulation functions go here
> > + *
> > + * FIDS are globally unique within a Lustre filessytem, and are made up
> > + * of three parts: sequence, Object ID, and version.
> > + *
> > + */
> > +#ifndef _LUSTRE_LUSTRE_FID_H_
> > +#define _LUSTRE_LUSTRE_FID_H_
> > +
> > +#include 
> > +
> > +/** returns fid object sequence */
> > +static inline __u64 fid_seq(const struct lu_fid *fid)
> > +{
> > +   return fid->f_seq;
> > +}
> > +
> > +/** returns fid object id */
> > +static inline __u32 fid_oid(const struct lu_fid *fid)
> > +{
> > +   return fid->f_oid;
> > +}
> > +
> > +/** returns fid object version */
> > +static inline __u32 fid_ver(const struct lu_fid *fid)
> > +{
> > +   return fid->f_ver;
> > +}
> > +
> > +static inline void fid_zero(struct lu_fid *fid)
> > +{
> > +   memset(fid, 0, sizeof(*fid));
> > +}
> > +
> > +static inline __u64 fid_ver_oid(const struct lu_fid *fid)
> > +{
> > +   return (__u64)fid_ver(fid) << 32 | fid_oid(fid);
> > +}
> > +
> > +static inline bool fid_seq_is_mdt0(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_OST_MDT0;
> > +}
> > +
> > +static inline bool fid_seq_is_mdt(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_OST_MDT0 || seq >= FID_SEQ_NORMAL;
> > +};
> > +
> > +static inline bool fid_seq_is_echo(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_ECHO;
> > +}
> > +
> > +static inline bool fid_is_echo(const struct lu_fid *fid)
> > +{
> > +   return fid_seq_is_echo(fid_seq(fid));
> > +}
> > +
> > +static inline bool fid_seq_is_llog(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_LLOG;
> > +}
> > +
> > +static inline bool fid_is_llog(const struct lu_fid *fid)
> > +{
> > +   /* file with OID == 0 is not llog but contains last oid */
> > +   return fid_seq_is_llog(fid_seq(fid)) && fid_oid(fid) > 0;
> > +}
> > +
> > +static inline bool fid_seq_is_rsvd(__u64 seq)
> > +{
> > +   return seq > FID_SEQ_OST_MDT0 && seq <= FID_SEQ_RSVD;
> > +};
> > +
> > +static inline bool fid_seq_is_special(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_SPECIAL;
> > +};
> > +
> > +static inline bool fid_seq_is_local_file(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_LOCAL_FILE ||
> > +  seq == FID_SEQ_LOCAL_NAME;
> > +};
> > +
> > +static inline bool fid_seq_is_root(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_ROOT;
> > +}
> > +
> > +static inline bool fid_seq_is_dot(__u64 seq)
> > +{
> > +   return seq == FID_SEQ_DOT_LUSTRE;
> > +}
> > +
> > +static inline bool fid_seq_is_defaul

[PATCH 00/34] staging: lustre: lnet: change lnet selftest UAPI typedefs to proper structure

2017-01-16 Thread James Simmons
The upstream kernel requires proper structures so
convert all the UAPI typdefs in lnetst.h.

Signed-off-by: James Simmons 
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 

James Simmons (34):
  staging: lustre: lnet: change lst_nid_t to proper structure
  staging: lustre: lnet: change lst_bid_t to proper structure
  staging: lustre: lnet: change lstcon_node_ent_t to proper structure
  staging: lustre: lnet: change lstcon_ndlist_ent_t to proper structure
  staging: lustre: lnet: change lstcon_test_ent_t to proper structure
  staging: lustre: lnet: change lstcon_batch_ent_t to proper structure
  staging: lustre: lnet: change lstcon_test_batch_ent_t to proper structure
  staging: lustre: lnet: change lstcon_rpc_ent_t to proper structure
  staging: lustre: lnet: change lstcon_trans_stat_t to proper structure
  staging: lustre: lnet: change lstio_session_new_args_t to proper structure
  staging: lustre: lnet: change lstio_session_info_args_t to proper structure
  staging: lustre: lnet: change lstio_session_end_args_t to proper structure
  staging: lustre: lnet: change lstio_debug_args_t to proper structure
  staging: lustre: lnet: change lstio_group_add_args_t to proper structure
  staging: lustre: lnet: change lstio_group_del_args_t to proper structure
  staging: lustre: lnet: change lstio_group_update_args_t to proper structure
  staging: lustre: lnet: change lstio_group_nodes_args_t to proper structure
  staging: lustre: lnet: change lstio_group_list_args_t to proper structure
  staging: lustre: lnet: change lstio_group_info_args_t to proper structure
  staging: lustre: lnet: change lstio_batch_add_args_t to proper structure
  staging: lustre: lnet: change lstio_batch_del_args_t to proper structure
  staging: lustre: lnet: change lstio_batch_run_args_t to proper structure
  staging: lustre: lnet: change lstio_batch_stop_args_t to proper structure
  staging: lustre: lnet: change lstio_batch_query_args_t to proper structure
  staging: lustre: lnet: change lstio_batch_list_args_t to proper structure
  staging: lustre: lnet: change lstio_batch_info_args_t to proper structure
  staging: lustre: lnet: change lstio_stat_args_t to proper structure
  staging: lustre: lnet: change lst_test_type_t to proper enum
  staging: lustre: lnet: change lstio_test_args_t to proper structure
  staging: lustre: lnet: change lst_brw_[type|flags]_t to proper enum
  staging: lustre: lnet: change lst_test_bulk_param_t to proper structure
  staging: lustre: lnet: change lst_test_ping_param_t to proper structure
  staging: lustre: lnet: change srpc_counters_t to proper structure
  staging: lustre: lnet: change sfw_counter_t to proper structure

 drivers/staging/lustre/include/linux/lnet/lnetst.h | 198 ++---
 drivers/staging/lustre/lnet/selftest/conctl.c  |  76 
 drivers/staging/lustre/lnet/selftest/conrpc.c  |  26 +--
 drivers/staging/lustre/lnet/selftest/conrpc.h  |   4 +-
 drivers/staging/lustre/lnet/selftest/console.c |  56 +++---
 drivers/staging/lustre/lnet/selftest/console.h |  24 +--
 drivers/staging/lustre/lnet/selftest/framework.c   |  10 +-
 drivers/staging/lustre/lnet/selftest/rpc.c |   6 +-
 drivers/staging/lustre/lnet/selftest/rpc.h |  38 ++--
 drivers/staging/lustre/lnet/selftest/selftest.h|   8 +-
 10 files changed, 223 insertions(+), 223 deletions(-)

-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/34] staging: lustre: lnet: change lstcon_rpc_ent_t to proper structure

2017-01-16 Thread James Simmons
Change lstcon_rpc_ent_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conrpc.c  | 4 ++--
 drivers/staging/lustre/lnet/selftest/conrpc.h  | 2 +-
 drivers/staging/lustre/lnet/selftest/console.c | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index adc03fe..f5c68c1 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -124,7 +124,7 @@ struct lstcon_test_batch_ent {
 }; /*** test/batch verbose information entry,
 *** for list_batch command */
 
-typedef struct {
+struct lstcon_rpc_ent {
struct list_headrpe_link;   /* link chain */
lnet_process_id_t   rpe_peer;   /* peer's id */
struct timeval  rpe_stamp;  /* time stamp of RPC */
@@ -135,7 +135,7 @@ struct lstcon_test_batch_ent {
int rpe_fwk_errno;  /* framework errno */
int rpe_priv[4];/* private data */
charrpe_payload[0]; /* private reply payload */
-} lstcon_rpc_ent_t;
+};
 
 typedef struct {
int trs_rpc_stat[4];/* RPCs stat (0: total
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
b/drivers/staging/lustre/lnet/selftest/conrpc.c
index 84ae010..bc924f9 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.c
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
@@ -469,7 +469,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
 {
struct list_head tmp;
struct list_head __user *next;
-   lstcon_rpc_ent_t *ent;
+   struct lstcon_rpc_ent *ent;
struct srpc_generic_reply *rep;
struct lstcon_rpc *crpc;
struct srpc_msg *msg;
@@ -492,7 +492,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
 
next = tmp.next;
 
-   ent = list_entry(next, lstcon_rpc_ent_t, rpe_link);
+   ent = list_entry(next, struct lstcon_rpc_ent, rpe_link);
 
LASSERT(crpc->crp_stamp);
 
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.h 
b/drivers/staging/lustre/lnet/selftest/conrpc.h
index e629e87..ad0a49e 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.h
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.h
@@ -103,7 +103,7 @@ struct lstcon_rpc_trans {
 
 typedef int (*lstcon_rpc_cond_func_t)(int, struct lstcon_node *, void *);
 typedef int (*lstcon_rpc_readent_func_t)(int, struct srpc_msg *,
-lstcon_rpc_ent_t __user *);
+struct lstcon_rpc_ent __user *);
 
 int  lstcon_sesrpc_prep(struct lstcon_node *nd, int transop,
unsigned int version, struct lstcon_rpc **crpc);
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index bf4111a..b01023c 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -368,7 +368,7 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
 
 static int
 lstcon_sesrpc_readent(int transop, struct srpc_msg *msg,
- lstcon_rpc_ent_t __user *ent_up)
+ struct lstcon_rpc_ent __user *ent_up)
 {
struct srpc_debug_reply *rep;
 
@@ -1385,7 +1385,7 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
 
 static int
 lstcon_tsbrpc_readent(int transop, struct srpc_msg *msg,
- lstcon_rpc_ent_t __user *ent_up)
+ struct lstcon_rpc_ent __user *ent_up)
 {
struct srpc_batch_reply *rep = &msg->msg_body.bat_reply;
 
@@ -1464,7 +1464,7 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
 
 static int
 lstcon_statrpc_readent(int transop, struct srpc_msg *msg,
-  lstcon_rpc_ent_t __user *ent_up)
+  struct lstcon_rpc_ent __user *ent_up)
 {
struct srpc_stat_reply *rep = &msg->msg_body.stat_reply;
sfw_counters_t __user *sfwk_stat;
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/34] staging: lustre: lnet: change lstcon_test_batch_ent_t to proper structure

2017-01-16 Thread James Simmons
Change lstcon_test_batch_ent_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h |  6 +++---
 drivers/staging/lustre/lnet/selftest/console.c | 10 +-
 drivers/staging/lustre/lnet/selftest/console.h |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index f2b98e9..adc03fe 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -112,7 +112,7 @@ struct lstcon_batch_ent {
 }; /*** batch summary entry, for
 *** list_batch command */
 
-typedef struct {
+struct lstcon_test_batch_ent {
struct lstcon_ndlist_ent   tbe_cli_nle; /* client (group) node_list
 * entry */
struct lstcon_ndlist_ent   tbe_srv_nle; /* server (group) node_list
@@ -121,7 +121,7 @@ struct lstcon_batch_ent {
struct lstcon_test_ent  tbe_test; /* test entry */
struct lstcon_batch_ent tbe_batch;/* batch entry */
} u;
-} lstcon_test_batch_ent_t; /*** test/batch verbose information entry,
+}; /*** test/batch verbose information entry,
 *** for list_batch command */
 
 typedef struct {
@@ -413,7 +413,7 @@ struct lstcon_batch_ent {
int  lstio_bat_server;  /* IN: query server
   or not */
int  lstio_bat_testidx; /* IN: test index */
-   lstcon_test_batch_ent_t __user *lstio_bat_entp; /* OUT: batch ent */
+   struct lstcon_test_batch_ent __user *lstio_bat_entp;/* OUT: batch ent */
 
int __user  *lstio_bat_idxp;/* IN/OUT: index of 
node */
int __user  *lstio_bat_ndentp;  /* IN/OUT: # of nodent 
*/
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 9af761f..bf4111a 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -926,11 +926,11 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
 }
 
 int
-lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
+lstcon_batch_info(char *name, struct lstcon_test_batch_ent __user *ent_up,
  int server, int testidx, int *index_p, int *ndent_p,
  struct lstcon_node_ent __user *dents_up)
 {
-   lstcon_test_batch_ent_t *entp;
+   struct lstcon_test_batch_ent *entp;
struct list_head *clilst;
struct list_head *srvlst;
struct lstcon_test *test = NULL;
@@ -969,7 +969,7 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
}
 
/* non-verbose query */
-   LIBCFS_ALLOC(entp, sizeof(lstcon_test_batch_ent_t));
+   LIBCFS_ALLOC(entp, sizeof(struct lstcon_test_batch_ent));
if (!entp)
return -ENOMEM;
 
@@ -989,9 +989,9 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
LST_NODE_STATE_COUNTER(ndl->ndl_node, &entp->tbe_srv_nle);
 
rc = copy_to_user(ent_up, entp,
- sizeof(lstcon_test_batch_ent_t)) ? -EFAULT : 0;
+ sizeof(struct lstcon_test_batch_ent)) ? -EFAULT : 0;
 
-   LIBCFS_FREE(entp, sizeof(lstcon_test_batch_ent_t));
+   LIBCFS_FREE(entp, sizeof(struct lstcon_test_batch_ent));
 
return rc;
 }
diff --git a/drivers/staging/lustre/lnet/selftest/console.h 
b/drivers/staging/lustre/lnet/selftest/console.h
index 30d73b6..f8d61ce 100644
--- a/drivers/staging/lustre/lnet/selftest/console.h
+++ b/drivers/staging/lustre/lnet/selftest/console.h
@@ -227,7 +227,7 @@ int lstcon_test_batch_query(char *name, int testidx,
struct list_head __user *result_up);
 int lstcon_batch_del(char *name);
 int lstcon_batch_list(int idx, int namelen, char __user *name_up);
-int lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
+int lstcon_batch_info(char *name, struct lstcon_test_batch_ent __user *ent_up,
  int server, int testidx, int *index_p,
  int *ndent_p, struct lstcon_node_ent __user *dents_up);
 int lstcon_group_stat(char *grp_name, int timeout,
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/34] staging: lustre: lnet: change lstio_group_update_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_group_update_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 2a02ce5..ff64c2f 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -310,7 +310,7 @@ struct lstio_group_del_args {
 * in the group */
 #define LST_GROUP_RMND 3   /* delete nodes from the group */
 
-typedef struct {
+struct lstio_group_update_args {
int  lstio_grp_key; /* IN: session key */
int  lstio_grp_opc; /* IN: OPC */
int  lstio_grp_args;/* IN: arguments */
@@ -320,7 +320,7 @@ struct lstio_group_del_args {
lnet_process_id_t __user *lstio_grp_idsp;   /* IN: array of nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of
result buffer */
-} lstio_group_update_args_t;
+};
 
 typedef struct {
int  lstio_grp_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 5a84c1f..0467f3f 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -256,7 +256,7 @@
 }
 
 static int
-lst_group_update_ioctl(lstio_group_update_args_t *args)
+lst_group_update_ioctl(struct lstio_group_update_args *args)
 {
int rc;
char *name;
@@ -873,7 +873,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_group_del_ioctl((struct lstio_group_del_args *)buf);
break;
case LSTIO_GROUP_UPDATE:
-   rc = lst_group_update_ioctl((lstio_group_update_args_t *)buf);
+   rc = lst_group_update_ioctl((struct lstio_group_update_args 
*)buf);
break;
case LSTIO_NODES_ADD:
rc = lst_nodes_add_ioctl((lstio_group_nodes_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/34] staging: lustre: lnet: change lstcon_trans_stat_t to proper structure

2017-01-16 Thread James Simmons
Change lstcon_trans_stat_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 34 +++---
 drivers/staging/lustre/lnet/selftest/conctl.c  |  4 +--
 drivers/staging/lustre/lnet/selftest/conrpc.c  |  8 ++---
 drivers/staging/lustre/lnet/selftest/conrpc.h  |  2 +-
 drivers/staging/lustre/lnet/selftest/console.h |  4 +--
 5 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index f5c68c1..48dc06f 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -137,7 +137,7 @@ struct lstcon_rpc_ent {
charrpe_payload[0]; /* private reply payload */
 };
 
-typedef struct {
+struct lstcon_trans_stat {
int trs_rpc_stat[4];/* RPCs stat (0: total
  1: failed
  2: finished
@@ -146,94 +146,94 @@ struct lstcon_rpc_ent {
int trs_fwk_stat[8];/* framework stat */
int trs_fwk_errno;  /* errno of the first remote error */
void*trs_fwk_private;   /* private framework stat */
-} lstcon_trans_stat_t;
+};
 
 static inline int
-lstcon_rpc_stat_total(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_total(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_rpc_stat[0] : stat->trs_rpc_stat[0];
 }
 
 static inline int
-lstcon_rpc_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_rpc_stat[1] : stat->trs_rpc_stat[1];
 }
 
 static inline int
-lstcon_rpc_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_rpc_stat[2] : stat->trs_rpc_stat[2];
 }
 
 static inline int
-lstcon_sesop_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesop_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_sesop_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesop_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_sesqry_stat_active(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_active(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_sesqry_stat_busy(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_busy(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_sesqry_stat_unknown(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_unknown(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
-lstcon_tsbop_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbop_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_tsbop_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbop_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_tsbqry_stat_idle(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_idle(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_tsbqry_stat_run(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_run(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_tsbqry_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
-lstcon_statqry_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_statqry_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_statqry_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_statqry_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
diff --git a/drivers/s

[PATCH 01/34] staging: lustre: lnet: change lst_nid_t to proper structure

2017-01-16 Thread James Simmons
Change lst_nid_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 12 -
 drivers/staging/lustre/lnet/selftest/conrpc.c  |  2 +-
 drivers/staging/lustre/lnet/selftest/console.c | 12 -
 drivers/staging/lustre/lnet/selftest/console.h |  8 +++---
 drivers/staging/lustre/lnet/selftest/framework.c   |  4 +--
 drivers/staging/lustre/lnet/selftest/rpc.h | 30 +++---
 drivers/staging/lustre/lnet/selftest/selftest.h|  2 +-
 7 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 8a84888..68c7f58 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -68,12 +68,12 @@
 #define LSTIO_BATCH_QUERY  0xC27   /* query batch status */
 #define LSTIO_STAT_QUERY   0xC30   /* get stats */
 
-typedef struct {
+struct lst_sid {
lnet_nid_t  ses_nid;/* nid of console node */
__u64   ses_stamp;  /* time stamp */
-} lst_sid_t;   /*** session id */
+}; /*** session id */
 
-extern lst_sid_t LST_INVALID_SID;
+extern struct lst_sid LST_INVALID_SID;
 
 typedef struct {
__u64   bat_id; /* unique id in session */
@@ -131,7 +131,7 @@
int rpe_state;  /* peer's state */
int rpe_rpc_errno;  /* RPC errno */
 
-   lst_sid_t   rpe_sid;/* peer's session id */
+   struct lst_sid  rpe_sid;/* peer's session id */
int rpe_fwk_errno;  /* framework errno */
int rpe_priv[4];/* private data */
charrpe_payload[0]; /* private reply payload */
@@ -245,14 +245,14 @@
int  lstio_ses_force;   /* IN: force create ? */
/** IN: session features */
unsigned int lstio_ses_feats;
-   lst_sid_t __user *lstio_ses_idp;/* OUT: session id */
+   struct lst_sid __user *lstio_ses_idp;   /* OUT: session id */
int  lstio_ses_nmlen;   /* IN: name length */
char __user  *lstio_ses_namep;  /* IN: session name */
 } lstio_session_new_args_t;
 
 /* query current session */
 typedef struct {
-   lst_sid_t __user*lstio_ses_idp; /* OUT: session id */
+   struct lst_sid __user   *lstio_ses_idp; /* OUT: session id */
int __user  *lstio_ses_keyp;/* OUT: local key */
/** OUT: session features */
unsigned int __user *lstio_ses_featp;
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
b/drivers/staging/lustre/lnet/selftest/conrpc.c
index 994422c..84ae010 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.c
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
@@ -519,7 +519,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
/* RPC is done */
rep = (struct srpc_generic_reply *)&msg->msg_body.reply;
 
-   if (copy_to_user(&ent->rpe_sid, &rep->sid, sizeof(lst_sid_t)) ||
+   if (copy_to_user(&ent->rpe_sid, &rep->sid, sizeof(rep->sid)) ||
copy_to_user(&ent->rpe_fwk_errno, &rep->status,
 sizeof(rep->status)))
return -EFAULT;
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 1456d239..02dbfef 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -1688,14 +1688,14 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
 }
 
 int
-lstcon_session_match(lst_sid_t sid)
+lstcon_session_match(struct lst_sid sid)
 {
return (console_session.ses_id.ses_nid == sid.ses_nid &&
console_session.ses_id.ses_stamp == sid.ses_stamp) ? 1 : 0;
 }
 
 static void
-lstcon_new_session_id(lst_sid_t *sid)
+lstcon_new_session_id(struct lst_sid *sid)
 {
lnet_process_id_t id;
 
@@ -1708,7 +1708,7 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
 
 int
 lstcon_session_new(char *name, int key, unsigned int feats,
-  int timeout, int force, lst_sid_t __user *sid_up)
+  int timeout, int force, struct lst_sid __user *sid_up)
 {
int rc = 0;
int i;
@@ -1767,7 +1767,7 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
}
 
if (!copy_to_user(sid_up, &console_session.ses_id,
- sizeof(lst_sid_t))

[PATCH 03/34] staging: lustre: lnet: change lstcon_node_ent_t to proper structure

2017-01-16 Thread James Simmons
Change lstcon_node_ent_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 8 
 drivers/staging/lustre/lnet/selftest/console.c | 6 +++---
 drivers/staging/lustre/lnet/selftest/console.h | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index b721287..3252239 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -85,10 +85,10 @@ struct lst_bid {
 #define LST_NODE_DOWN  0x4 /* node is down */
 #define LST_NODE_UNKNOWN   0x8 /* node not in session */
 
-typedef struct {
+struct lstcon_node_ent {
lnet_process_id_t   nde_id; /* id of node */
int nde_state;  /* state of node */
-} lstcon_node_ent_t;   /*** node entry, for list_group command */
+}; /*** node entry, for list_group command */
 
 typedef struct {
int nle_nnode;  /* # of nodes */
@@ -349,7 +349,7 @@ struct lst_bid {
group */
int __user  *lstio_grp_idxp;/* IN/OUT: node index */
int __user  *lstio_grp_ndentp;  /* IN/OUT: # of nodent 
*/
-   lstcon_node_ent_t __user *lstio_grp_dentsp; /* OUT: nodent array */
+   struct lstcon_node_ent __user *lstio_grp_dentsp;/* OUT: nodent 
array */
 } lstio_group_info_args_t;
 
 #define LST_DEFAULT_BATCH  "batch" /* default batch name */
@@ -417,7 +417,7 @@ struct lst_bid {
 
int __user  *lstio_bat_idxp;/* IN/OUT: index of 
node */
int __user  *lstio_bat_ndentp;  /* IN/OUT: # of nodent 
*/
-   lstcon_node_ent_t __user *lstio_bat_dentsp; /* array of nodent */
+   struct lstcon_node_ent __user *lstio_bat_dentsp;/* array of nodent */
 } lstio_batch_info_args_t;
 
 /* add stat in session */
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 02dbfef..8855d2e 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -741,7 +741,7 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
 
 static int
 lstcon_nodes_getent(struct list_head *head, int *index_p,
-   int *count_p, lstcon_node_ent_t __user *dents_up)
+   int *count_p, struct lstcon_node_ent __user *dents_up)
 {
struct lstcon_ndlink *ndl;
struct lstcon_node *nd;
@@ -782,7 +782,7 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
 int
 lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
  int *index_p, int *count_p,
- lstcon_node_ent_t __user *dents_up)
+ struct lstcon_node_ent __user *dents_up)
 {
lstcon_ndlist_ent_t *gentp;
struct lstcon_group *grp;
@@ -928,7 +928,7 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
 int
 lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
  int server, int testidx, int *index_p, int *ndent_p,
- lstcon_node_ent_t __user *dents_up)
+ struct lstcon_node_ent __user *dents_up)
 {
lstcon_test_batch_ent_t *entp;
struct list_head *clilst;
diff --git a/drivers/staging/lustre/lnet/selftest/console.h 
b/drivers/staging/lustre/lnet/selftest/console.h
index b37c37e..f6cc694 100644
--- a/drivers/staging/lustre/lnet/selftest/console.h
+++ b/drivers/staging/lustre/lnet/selftest/console.h
@@ -215,7 +215,7 @@ int lstcon_nodes_remove(char *name, int nnd, 
lnet_process_id_t __user *nds_up,
struct list_head __user *result_up);
 int lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gent_up,
  int *index_p, int *ndent_p,
- lstcon_node_ent_t __user *ndents_up);
+ struct lstcon_node_ent __user *ndents_up);
 int lstcon_group_list(int idx, int len, char __user *name_up);
 int lstcon_batch_add(char *name);
 int lstcon_batch_run(char *name, int timeout,
@@ -229,7 +229,7 @@ int lstcon_test_batch_query(char *name, int testidx,
 int lstcon_batch_list(int idx, int namelen, char __user *name_up);
 int lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
  int server, int testidx, int *index_p,
- int *ndent_p, lstcon_node_ent_t __user *dents_up);
+ int *ndent_p, struct lstcon_node_ent __user *dents_up);
 int lstcon_group_stat

[PATCH 19/34] staging: lustre: lnet: change lstio_group_info_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_group_info_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 12aa7b6..715e591 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -341,7 +341,7 @@ struct lstio_group_list_args {
char __user *lstio_grp_namep;   /* OUT: name */
 };
 
-typedef struct {
+struct lstio_group_info_args {
int  lstio_grp_key; /* IN: session key */
int  lstio_grp_nmlen;   /* IN: name len */
char __user *lstio_grp_namep;   /* IN: name */
@@ -350,7 +350,7 @@ struct lstio_group_list_args {
int __user  *lstio_grp_idxp;/* IN/OUT: node index */
int __user  *lstio_grp_ndentp;  /* IN/OUT: # of nodent 
*/
struct lstcon_node_ent __user *lstio_grp_dentsp;/* OUT: nodent array */
-} lstio_group_info_args_t;
+};
 
 #define LST_DEFAULT_BATCH  "batch" /* default batch name */
 
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index a2513d8..e9b2d97 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -375,7 +375,7 @@
 }
 
 static int
-lst_group_info_ioctl(lstio_group_info_args_t *args)
+lst_group_info_ioctl(struct lstio_group_info_args *args)
 {
char *name;
int ndent;
@@ -882,7 +882,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_group_list_ioctl((struct lstio_group_list_args *)buf);
break;
case LSTIO_GROUP_INFO:
-   rc = lst_group_info_ioctl((lstio_group_info_args_t *)buf);
+   rc = lst_group_info_ioctl((struct lstio_group_info_args *)buf);
break;
case LSTIO_BATCH_ADD:
rc = lst_batch_add_ioctl((lstio_batch_add_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/34] staging: lustre: lnet: change lstio_session_new_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_session_new_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 48dc06f..079644e 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -239,7 +239,7 @@ struct lstcon_trans_stat {
 }
 
 /* create a session */
-typedef struct {
+struct lstio_session_new_args {
int  lstio_ses_key; /* IN: local key */
int  lstio_ses_timeout; /* IN: session timeout */
int  lstio_ses_force;   /* IN: force create ? */
@@ -248,7 +248,7 @@ struct lstcon_trans_stat {
struct lst_sid __user *lstio_ses_idp;   /* OUT: session id */
int  lstio_ses_nmlen;   /* IN: name length */
char __user  *lstio_ses_namep;  /* IN: session name */
-} lstio_session_new_args_t;
+};
 
 /* query current session */
 typedef struct {
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index a897738..9007ebf 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -42,7 +42,7 @@
 #include "console.h"
 
 static int
-lst_session_new_ioctl(lstio_session_new_args_t *args)
+lst_session_new_ioctl(struct lstio_session_new_args *args)
 {
char *name;
int rc;
@@ -855,7 +855,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
 
switch (opc) {
case LSTIO_SESSION_NEW:
-   rc = lst_session_new_ioctl((lstio_session_new_args_t *)buf);
+   rc = lst_session_new_ioctl((struct lstio_session_new_args 
*)buf);
break;
case LSTIO_SESSION_END:
rc = lst_session_end_ioctl((lstio_session_end_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/34] staging: lustre: lnet: change lstcon_batch_ent_t to proper structure

2017-01-16 Thread James Simmons
Change lstcon_batch_ent_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index f197eb3..f2b98e9 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -105,11 +105,11 @@ struct lstcon_test_ent {
 }; /*** test summary entry, for
 *** list_batch command */
 
-typedef struct {
+struct lstcon_batch_ent {
int bae_state;  /* batch status */
int bae_timeout;/* batch timeout */
int bae_ntest;  /* # of tests in the batch */
-} lstcon_batch_ent_t;  /*** batch summary entry, for
+}; /*** batch summary entry, for
 *** list_batch command */
 
 typedef struct {
@@ -119,7 +119,7 @@ struct lstcon_test_ent {
 * entry */
union {
struct lstcon_test_ent  tbe_test; /* test entry */
-   lstcon_batch_ent_t tbe_batch;   /* batch entry */
+   struct lstcon_batch_ent tbe_batch;/* batch entry */
} u;
 } lstcon_test_batch_ent_t; /*** test/batch verbose information entry,
 *** for list_batch command */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/34] staging: lustre: lnet: change lstcon_ndlist_ent_t to proper structure

2017-01-16 Thread James Simmons
Change lstcon_ndlist_ent_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 16 
 drivers/staging/lustre/lnet/selftest/console.c | 14 +++---
 drivers/staging/lustre/lnet/selftest/console.h |  4 ++--
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 3252239..ec243d7 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -90,13 +90,13 @@ struct lstcon_node_ent {
int nde_state;  /* state of node */
 }; /*** node entry, for list_group command */
 
-typedef struct {
+struct lstcon_ndlist_ent {
int nle_nnode;  /* # of nodes */
int nle_nactive;/* # of active nodes */
int nle_nbusy;  /* # of busy nodes */
int nle_ndown;  /* # of down nodes */
int nle_nunknown;   /* # of unknown nodes */
-} lstcon_ndlist_ent_t; /*** node_list entry, for list_batch command */
+}; /*** node_list entry, for list_batch command */
 
 typedef struct {
int tse_type;   /* test type */
@@ -113,9 +113,9 @@ struct lstcon_node_ent {
 *** list_batch command */
 
 typedef struct {
-   lstcon_ndlist_ent_t tbe_cli_nle;/* client (group) node_list
+   struct lstcon_ndlist_ent   tbe_cli_nle; /* client (group) node_list
 * entry */
-   lstcon_ndlist_ent_t tbe_srv_nle;/* server (group) node_list
+   struct lstcon_ndlist_ent   tbe_srv_nle; /* server (group) node_list
 * entry */
union {
lstcon_test_ent_t  tbe_test;/* test entry */
@@ -256,7 +256,7 @@ struct lstcon_node_ent {
int __user  *lstio_ses_keyp;/* OUT: local key */
/** OUT: session features */
unsigned int __user *lstio_ses_featp;
-   lstcon_ndlist_ent_t __user *lstio_ses_ndinfo;   /* OUT: */
+   struct lstcon_ndlist_ent __user *lstio_ses_ndinfo;/* OUT: */
int  lstio_ses_nmlen;   /* IN: name length */
char __user *lstio_ses_namep;   /* OUT: session name */
 } lstio_session_info_args_t;
@@ -345,11 +345,11 @@ struct lstcon_node_ent {
int  lstio_grp_key; /* IN: session key */
int  lstio_grp_nmlen;   /* IN: name len */
char __user *lstio_grp_namep;   /* IN: name */
-   lstcon_ndlist_ent_t __user *lstio_grp_entp; /* OUT: description of
-   group */
+   struct lstcon_ndlist_ent __user *lstio_grp_entp;/* OUT: description of
+  group */
int __user  *lstio_grp_idxp;/* IN/OUT: node index */
int __user  *lstio_grp_ndentp;  /* IN/OUT: # of nodent 
*/
-   struct lstcon_node_ent __user *lstio_grp_dentsp;/* OUT: nodent 
array */
+   struct lstcon_node_ent __user *lstio_grp_dentsp;/* OUT: nodent array */
 } lstio_group_info_args_t;
 
 #define LST_DEFAULT_BATCH  "batch" /* default batch name */
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 8855d2e..9af761f 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -780,11 +780,11 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
 }
 
 int
-lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
+lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gents_p,
  int *index_p, int *count_p,
  struct lstcon_node_ent __user *dents_up)
 {
-   lstcon_ndlist_ent_t *gentp;
+   struct lstcon_ndlist_ent *gentp;
struct lstcon_group *grp;
struct lstcon_ndlink *ndl;
int rc;
@@ -805,7 +805,7 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
}
 
/* non-verbose query */
-   LIBCFS_ALLOC(gentp, sizeof(lstcon_ndlist_ent_t));
+   LIBCFS_ALLOC(gentp, sizeof(struct lstcon_ndlist_ent));
if (!gentp) {
CERROR("Can't allocate ndlist_ent\n");
lstcon_group_decref(grp);
@@ -817,9 +817,9 @@ static void lstcon_group_ndlink_release(struct lstcon_group 
*,
LST_NODE_STATE_COUNTER(ndl->ndl_node, gentp);
 
r

[PATCH 14/34] staging: lustre: lnet: change lstio_group_add_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_group_add_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 03ebdc3..7194552 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -293,11 +293,11 @@ struct lstio_debug_args {
result buffer */
 };
 
-typedef struct {
+struct lstio_group_add_args {
int  lstio_grp_key; /* IN: session key */
int  lstio_grp_nmlen;   /* IN: name length */
char __user *lstio_grp_namep;   /* IN: group name */
-} lstio_group_add_args_t;
+};
 
 typedef struct {
int  lstio_grp_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index e143e52..c3435b4 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -190,7 +190,7 @@
 }
 
 static int
-lst_group_add_ioctl(lstio_group_add_args_t *args)
+lst_group_add_ioctl(struct lstio_group_add_args *args)
 {
char *name;
int rc;
@@ -867,7 +867,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_debug_ioctl((struct lstio_debug_args *)buf);
break;
case LSTIO_GROUP_ADD:
-   rc = lst_group_add_ioctl((lstio_group_add_args_t *)buf);
+   rc = lst_group_add_ioctl((struct lstio_group_add_args *)buf);
break;
case LSTIO_GROUP_DEL:
rc = lst_group_del_ioctl((lstio_group_del_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/34] staging: lustre: lnet: change lstio_session_end_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_session_end_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 6dfccc5..dbcfc1f 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -262,9 +262,9 @@ struct lstio_session_info_args {
 };
 
 /* delete a session */
-typedef struct {
+struct lstio_session_end_args {
int lstio_ses_key;  /* IN: session key */
-} lstio_session_end_args_t;
+};
 
 #define LST_OPC_SESSION1
 #define LST_OPC_GROUP  2
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index b360310..3217447 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -78,7 +78,7 @@
 }
 
 static int
-lst_session_end_ioctl(lstio_session_end_args_t *args)
+lst_session_end_ioctl(struct lstio_session_end_args *args)
 {
if (args->lstio_ses_key != console_session.ses_key)
return -EACCES;
@@ -858,7 +858,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_session_new_ioctl((struct lstio_session_new_args 
*)buf);
break;
case LSTIO_SESSION_END:
-   rc = lst_session_end_ioctl((lstio_session_end_args_t *)buf);
+   rc = lst_session_end_ioctl((struct lstio_session_end_args 
*)buf);
break;
case LSTIO_SESSION_INFO:
rc = lst_session_info_ioctl((struct lstio_session_info_args 
*)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 22/34] staging: lustre: lnet: change lstio_batch_run_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_batch_run_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index c01931c..2c80c34 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -366,7 +366,7 @@ struct lstio_batch_del_args {
char __user *lstio_bat_namep;   /* IN: batch name */
 };
 
-typedef struct {
+struct lstio_batch_run_args {
int  lstio_bat_key; /* IN: session key */
int  lstio_bat_timeout; /* IN: timeout for
   the batch */
@@ -374,7 +374,7 @@ struct lstio_batch_del_args {
char __user *lstio_bat_namep;   /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
result buffer */
-} lstio_batch_run_args_t;
+};
 
 typedef struct {
int  lstio_bat_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 0ed59be..6631824 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -471,7 +471,7 @@
 }
 
 static int
-lst_batch_run_ioctl(lstio_batch_run_args_t *args)
+lst_batch_run_ioctl(struct lstio_batch_run_args *args)
 {
int rc;
char *name;
@@ -888,7 +888,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_batch_add_ioctl((struct lstio_batch_add_args *)buf);
break;
case LSTIO_BATCH_START:
-   rc = lst_batch_run_ioctl((lstio_batch_run_args_t *)buf);
+   rc = lst_batch_run_ioctl((struct lstio_batch_run_args *)buf);
break;
case LSTIO_BATCH_STOP:
rc = lst_batch_stop_ioctl((lstio_batch_stop_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/34] staging: lustre: lnet: change lstcon_test_ent_t to proper structure

2017-01-16 Thread James Simmons
Change lstcon_test_ent_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index ec243d7..f197eb3 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -98,11 +98,11 @@ struct lstcon_ndlist_ent {
int nle_nunknown;   /* # of unknown nodes */
 }; /*** node_list entry, for list_batch command */
 
-typedef struct {
+struct lstcon_test_ent {
int tse_type;   /* test type */
int tse_loop;   /* loop count */
int tse_concur; /* concurrency of test */
-} lstcon_test_ent_t;   /*** test summary entry, for
+}; /*** test summary entry, for
 *** list_batch command */
 
 typedef struct {
@@ -118,7 +118,7 @@ struct lstcon_ndlist_ent {
struct lstcon_ndlist_ent   tbe_srv_nle; /* server (group) node_list
 * entry */
union {
-   lstcon_test_ent_t  tbe_test;/* test entry */
+   struct lstcon_test_ent  tbe_test; /* test entry */
lstcon_batch_ent_t tbe_batch;   /* batch entry */
} u;
 } lstcon_test_batch_ent_t; /*** test/batch verbose information entry,
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 23/34] staging: lustre: lnet: change lstio_batch_stop_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_batch_stop_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 2c80c34..9e90be1 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -376,7 +376,7 @@ struct lstio_batch_run_args {
result buffer */
 };
 
-typedef struct {
+struct lstio_batch_stop_args {
int  lstio_bat_key; /* IN: session key */
int  lstio_bat_force;   /* IN: abort unfinished
   test RPC */
@@ -384,7 +384,7 @@ struct lstio_batch_run_args {
char __user *lstio_bat_namep;   /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
result buffer */
-} lstio_batch_stop_args_t;
+};
 
 typedef struct {
int  lstio_bat_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 6631824..78dbfa2 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -505,7 +505,7 @@
 }
 
 static int
-lst_batch_stop_ioctl(lstio_batch_stop_args_t *args)
+lst_batch_stop_ioctl(struct lstio_batch_stop_args *args)
 {
int rc;
char *name;
@@ -891,7 +891,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_batch_run_ioctl((struct lstio_batch_run_args *)buf);
break;
case LSTIO_BATCH_STOP:
-   rc = lst_batch_stop_ioctl((lstio_batch_stop_args_t *)buf);
+   rc = lst_batch_stop_ioctl((struct lstio_batch_stop_args *)buf);
break;
case LSTIO_BATCH_QUERY:
rc = lst_batch_query_ioctl((lstio_batch_query_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 17/34] staging: lustre: lnet: change lstio_group_nodes_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_group_nodes_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index ff64c2f..bee55a0 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -322,7 +322,7 @@ struct lstio_group_update_args {
result buffer */
 };
 
-typedef struct {
+struct lstio_group_nodes_args {
int  lstio_grp_key; /* IN: session key */
int  lstio_grp_nmlen;   /* IN: name length */
char __user *lstio_grp_namep;   /* IN: group name */
@@ -332,7 +332,7 @@ struct lstio_group_update_args {
lnet_process_id_t __user *lstio_grp_idsp;   /* IN: nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of
result buffer */
-} lstio_group_nodes_args_t;
+};
 
 typedef struct {
int  lstio_grp_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 0467f3f..fe42e63 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -313,7 +313,7 @@
 }
 
 static int
-lst_nodes_add_ioctl(lstio_group_nodes_args_t *args)
+lst_nodes_add_ioctl(struct lstio_group_nodes_args *args)
 {
unsigned int feats;
int rc;
@@ -876,7 +876,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_group_update_ioctl((struct lstio_group_update_args 
*)buf);
break;
case LSTIO_NODES_ADD:
-   rc = lst_nodes_add_ioctl((lstio_group_nodes_args_t *)buf);
+   rc = lst_nodes_add_ioctl((struct lstio_group_nodes_args *)buf);
break;
case LSTIO_GROUP_LIST:
rc = lst_group_list_ioctl((lstio_group_list_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/34] staging: lustre: lnet: change lstio_session_info_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_session_info_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 079644e..6dfccc5 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -251,7 +251,7 @@ struct lstio_session_new_args {
 };
 
 /* query current session */
-typedef struct {
+struct lstio_session_info_args {
struct lst_sid __user   *lstio_ses_idp; /* OUT: session id */
int __user  *lstio_ses_keyp;/* OUT: local key */
/** OUT: session features */
@@ -259,7 +259,7 @@ struct lstio_session_new_args {
struct lstcon_ndlist_ent __user *lstio_ses_ndinfo;/* OUT: */
int  lstio_ses_nmlen;   /* IN: name length */
char __user *lstio_ses_namep;   /* OUT: session name */
-} lstio_session_info_args_t;
+};
 
 /* delete a session */
 typedef struct {
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 9007ebf..b360310 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -87,7 +87,7 @@
 }
 
 static int
-lst_session_info_ioctl(lstio_session_info_args_t *args)
+lst_session_info_ioctl(struct lstio_session_info_args *args)
 {
/* no checking of key */
 
@@ -861,7 +861,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_session_end_ioctl((lstio_session_end_args_t *)buf);
break;
case LSTIO_SESSION_INFO:
-   rc = lst_session_info_ioctl((lstio_session_info_args_t *)buf);
+   rc = lst_session_info_ioctl((struct lstio_session_info_args 
*)buf);
break;
case LSTIO_DEBUG:
rc = lst_debug_ioctl((lstio_debug_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/34] staging: lustre: lnet: change lst_bid_t to proper structure

2017-01-16 Thread James Simmons
Change lst_bid_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/console.h | 2 +-
 drivers/staging/lustre/lnet/selftest/framework.c   | 4 ++--
 drivers/staging/lustre/lnet/selftest/rpc.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/selftest.h| 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 68c7f58..b721287 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -75,9 +75,9 @@ struct lst_sid {
 
 extern struct lst_sid LST_INVALID_SID;
 
-typedef struct {
+struct lst_bid {
__u64   bat_id; /* unique id in session */
-} lst_bid_t;   /*** batch id (group of tests) */
+}; /*** batch id (group of tests) */
 
 /* Status of test node */
 #define LST_NODE_ACTIVE0x1 /* node in this session */
diff --git a/drivers/staging/lustre/lnet/selftest/console.h 
b/drivers/staging/lustre/lnet/selftest/console.h
index 4bf7ecd..b37c37e 100644
--- a/drivers/staging/lustre/lnet/selftest/console.h
+++ b/drivers/staging/lustre/lnet/selftest/console.h
@@ -81,7 +81,7 @@ struct lstcon_group {
 #define LST_BATCH_RUNNING 0xB1 /* running batch */
 
 struct lstcon_tsb_hdr {
-   lst_bid_ttsb_id; /* batch ID */
+   struct lst_bid   tsb_id; /* batch ID */
int  tsb_index;  /* test index */
 };
 
diff --git a/drivers/staging/lustre/lnet/selftest/framework.c 
b/drivers/staging/lustre/lnet/selftest/framework.c
index 4100f67..5ca6712 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -316,7 +316,7 @@
 }
 
 static struct sfw_batch *
-sfw_find_batch(lst_bid_t bid)
+sfw_find_batch(struct lst_bid bid)
 {
struct sfw_session *sn = sfw_data.fw_session;
struct sfw_batch *bat;
@@ -332,7 +332,7 @@
 }
 
 static struct sfw_batch *
-sfw_bid2batch(lst_bid_t bid)
+sfw_bid2batch(struct lst_bid bid)
 {
struct sfw_session *sn = sfw_data.fw_session;
struct sfw_batch *bat;
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.h 
b/drivers/staging/lustre/lnet/selftest/rpc.h
index 3324c3f..f2987c5 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.h
+++ b/drivers/staging/lustre/lnet/selftest/rpc.h
@@ -139,7 +139,7 @@ struct srpc_debug_reply {
 struct srpc_batch_reqst {
__u64  bar_rpyid;  /* reply buffer matchbits */
struct lst_sid bar_sid;/* session id */
-   lst_bid_t  bar_bid;/* batch id */
+   struct lst_bid bar_bid;/* batch id */
__u32  bar_opc;/* create/start/stop batch */
__u32  bar_testidx;/* index of test */
__u32  bar_arg;/* parameters */
@@ -188,7 +188,7 @@ struct srpc_test_reqst {
__u64   tsr_rpyid;  /* reply buffer matchbits */
__u64   tsr_bulkid; /* bulk buffer matchbits */
struct lst_sid  tsr_sid;/* session id */
-   lst_bid_t   tsr_bid;/* batch id */
+   struct lst_bid  tsr_bid;/* batch id */
__u32   tsr_service;/* test type: bulk|ping|... */
__u32   tsr_loop;   /* test client loop count or
 * # server buffers needed
diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h 
b/drivers/staging/lustre/lnet/selftest/selftest.h
index 35f98ae..79b05aa 100644
--- a/drivers/staging/lustre/lnet/selftest/selftest.h
+++ b/drivers/staging/lustre/lnet/selftest/selftest.h
@@ -340,7 +340,7 @@ struct sfw_session {
 
 struct sfw_batch {
struct list_head bat_list;  /* chain on sn_batches */
-   lst_bid_tbat_id;/* batch id */
+   struct lst_bid   bat_id;/* batch id */
int  bat_error; /* error code of batch */
struct sfw_session  *bat_session;   /* batch's session */
atomic_t bat_nactive;   /* # of active tests */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/34] staging: lustre: lnet: change lstio_debug_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_debug_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index dbcfc1f..03ebdc3 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -272,7 +272,7 @@ struct lstio_session_end_args {
 #define LST_OPC_BATCHCLI   4
 #define LST_OPC_BATCHSRV   5
 
-typedef struct {
+struct lstio_debug_args {
int  lstio_dbg_key; /* IN: session key */
int  lstio_dbg_type;/* IN: debug
session|batch|
@@ -291,7 +291,7 @@ struct lstio_session_end_args {
   nodes */
struct list_head __user *lstio_dbg_resultp; /* OUT: list head of
result buffer */
-} lstio_debug_args_t;
+};
 
 typedef struct {
int  lstio_grp_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 3217447..e143e52 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -109,7 +109,7 @@
 }
 
 static int
-lst_debug_ioctl(lstio_debug_args_t *args)
+lst_debug_ioctl(struct lstio_debug_args *args)
 {
char *name = NULL;
int client = 1;
@@ -864,7 +864,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_session_info_ioctl((struct lstio_session_info_args 
*)buf);
break;
case LSTIO_DEBUG:
-   rc = lst_debug_ioctl((lstio_debug_args_t *)buf);
+   rc = lst_debug_ioctl((struct lstio_debug_args *)buf);
break;
case LSTIO_GROUP_ADD:
rc = lst_group_add_ioctl((lstio_group_add_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 21/34] staging: lustre: lnet: change lstio_batch_del_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_batch_del_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 41cbe3a..c01931c 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -360,11 +360,11 @@ struct lstio_batch_add_args {
char __user *lstio_bat_namep;   /* IN: batch name */
 };
 
-typedef struct {
+struct lstio_batch_del_args {
int  lstio_bat_key; /* IN: session key */
int  lstio_bat_nmlen;   /* IN: name length */
char __user *lstio_bat_namep;   /* IN: batch name */
-} lstio_batch_del_args_t;
+};
 
 typedef struct {
int  lstio_bat_key; /* IN: session key */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 24/34] staging: lustre: lnet: change lstio_batch_query_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_batch_query_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 9e90be1..a65309c 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -386,7 +386,7 @@ struct lstio_batch_stop_args {
result buffer */
 };
 
-typedef struct {
+struct lstio_batch_query_args {
int  lstio_bat_key; /* IN: session key */
int  lstio_bat_testidx; /* IN: test index */
int  lstio_bat_client;  /* IN: we testing
@@ -397,7 +397,7 @@ struct lstio_batch_stop_args {
char __user *lstio_bat_namep;   /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
result buffer */
-} lstio_batch_query_args_t;
+};
 
 typedef struct {
int  lstio_bat_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 78dbfa2..353008e 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -540,7 +540,7 @@
 }
 
 static int
-lst_batch_query_ioctl(lstio_batch_query_args_t *args)
+lst_batch_query_ioctl(struct lstio_batch_query_args *args)
 {
char *name;
int rc;
@@ -894,7 +894,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_batch_stop_ioctl((struct lstio_batch_stop_args *)buf);
break;
case LSTIO_BATCH_QUERY:
-   rc = lst_batch_query_ioctl((lstio_batch_query_args_t *)buf);
+   rc = lst_batch_query_ioctl((struct lstio_batch_query_args 
*)buf);
break;
case LSTIO_BATCH_LIST:
rc = lst_batch_list_ioctl((lstio_batch_list_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 20/34] staging: lustre: lnet: change lstio_batch_add_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_batch_add_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 715e591..41cbe3a 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -354,11 +354,11 @@ struct lstio_group_info_args {
 
 #define LST_DEFAULT_BATCH  "batch" /* default batch name */
 
-typedef struct {
+struct lstio_batch_add_args {
int  lstio_bat_key; /* IN: session key */
int  lstio_bat_nmlen;   /* IN: name length */
char __user *lstio_bat_namep;   /* IN: batch name */
-} lstio_batch_add_args_t;
+};
 
 typedef struct {
int  lstio_bat_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index e9b2d97..0ed59be 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -438,7 +438,7 @@
 }
 
 static int
-lst_batch_add_ioctl(lstio_batch_add_args_t *args)
+lst_batch_add_ioctl(struct lstio_batch_add_args *args)
 {
int rc;
char *name;
@@ -885,7 +885,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_group_info_ioctl((struct lstio_group_info_args *)buf);
break;
case LSTIO_BATCH_ADD:
-   rc = lst_batch_add_ioctl((lstio_batch_add_args_t *)buf);
+   rc = lst_batch_add_ioctl((struct lstio_batch_add_args *)buf);
break;
case LSTIO_BATCH_START:
rc = lst_batch_run_ioctl((lstio_batch_run_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 30/34] staging: lustre: lnet: change lst_brw_[type|flags]_t to proper enum

2017-01-16 Thread James Simmons
Change lst_brw_[type|flags]_t from typedef to proper enum.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index fdab4b6..0279e09 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -474,16 +474,16 @@ struct lstio_test_args {
result buffer */
 };
 
-typedef enum {
+enum lst_brw_type {
LST_BRW_READ= 1,
LST_BRW_WRITE   = 2
-} lst_brw_type_t;
+};
 
-typedef enum {
+enum lst_brw_flags {
LST_BRW_CHECK_NONE  = 1,
LST_BRW_CHECK_SIMPLE= 2,
LST_BRW_CHECK_FULL  = 3
-} lst_brw_flags_t;
+};
 
 typedef struct {
int blk_opc;/* bulk operation code */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 25/34] staging: lustre: lnet: change lstio_batch_list_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_batch_list_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index a65309c..5e594f6 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -399,12 +399,12 @@ struct lstio_batch_query_args {
result buffer */
 };
 
-typedef struct {
+struct lstio_batch_list_args {
int  lstio_bat_key; /* IN: session key */
int  lstio_bat_idx; /* IN: index */
int  lstio_bat_nmlen;   /* IN: name length */
char __user *lstio_bat_namep;   /* IN: batch name */
-} lstio_batch_list_args_t;
+};
 
 typedef struct {
int  lstio_bat_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 353008e..fd5eb7b 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -581,7 +581,7 @@
 }
 
 static int
-lst_batch_list_ioctl(lstio_batch_list_args_t *args)
+lst_batch_list_ioctl(struct lstio_batch_list_args *args)
 {
if (args->lstio_bat_key != console_session.ses_key)
return -EACCES;
@@ -897,7 +897,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_batch_query_ioctl((struct lstio_batch_query_args 
*)buf);
break;
case LSTIO_BATCH_LIST:
-   rc = lst_batch_list_ioctl((lstio_batch_list_args_t *)buf);
+   rc = lst_batch_list_ioctl((struct lstio_batch_list_args *)buf);
break;
case LSTIO_BATCH_INFO:
rc = lst_batch_info_ioctl((lstio_batch_info_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 29/34] staging: lustre: lnet: change lstio_test_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_test_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 495cc01..fdab4b6 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -442,7 +442,7 @@ enum lst_test_type {
 /* create a test in a batch */
 #define LST_MAX_CONCUR 1024/* Max concurrency of test */
 
-typedef struct {
+struct lstio_test_args {
int   lstio_tes_key;/* IN: session key */
int   lstio_tes_bat_nmlen;  /* IN: batch name len */
char __user  *lstio_tes_bat_name;   /* IN: batch name */
@@ -472,7 +472,7 @@ enum lst_test_type {
value */
struct list_head __user *lstio_tes_resultp;/* OUT: list head of
result buffer */
-} lstio_test_args_t;
+};
 
 typedef enum {
LST_BRW_READ= 1,
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index 9039f9f..6ca7192 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -707,7 +707,7 @@
return rc;
 }
 
-static int lst_test_add_ioctl(lstio_test_args_t *args)
+static int lst_test_add_ioctl(struct lstio_test_args *args)
 {
char *batch_name;
char *src_name = NULL;
@@ -903,7 +903,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_batch_info_ioctl((struct lstio_batch_info_args *)buf);
break;
case LSTIO_TEST_ADD:
-   rc = lst_test_add_ioctl((lstio_test_args_t *)buf);
+   rc = lst_test_add_ioctl((struct lstio_test_args *)buf);
break;
case LSTIO_STAT_QUERY:
rc = lst_stat_query_ioctl((struct lstio_stat_args *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 34/34] staging: lustre: lnet: change sfw_counter_t to proper structure

2017-01-16 Thread James Simmons
Change sfw_counter_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/console.c | 4 ++--
 drivers/staging/lustre/lnet/selftest/framework.c   | 2 +-
 drivers/staging/lustre/lnet/selftest/rpc.h | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 575d23a..c81c246 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -511,13 +511,13 @@ struct srpc_counters {
__u64 bulk_put;
 } WIRE_ATTR;
 
-typedef struct {
+struct sfw_counters {
/** milliseconds since current session started */
__u32 running_ms;
__u32 active_batches;
__u32 zombie_sessions;
__u32 brw_errors;
__u32 ping_errors;
-} WIRE_ATTR sfw_counters_t;
+} WIRE_ATTR;
 
 #endif
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 483a1bb..4e7e5c8 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -1467,14 +1467,14 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
   struct lstcon_rpc_ent __user *ent_up)
 {
struct srpc_stat_reply *rep = &msg->msg_body.stat_reply;
-   sfw_counters_t __user *sfwk_stat;
+   struct sfw_counters __user *sfwk_stat;
struct srpc_counters __user *srpc_stat;
lnet_counters_t __user *lnet_stat;
 
if (rep->str_status)
return 0;
 
-   sfwk_stat = (sfw_counters_t __user *)&ent_up->rpe_payload[0];
+   sfwk_stat = (struct sfw_counters __user *)&ent_up->rpe_payload[0];
srpc_stat = (struct srpc_counters __user *)(sfwk_stat + 1);
lnet_stat = (lnet_counters_t __user *)(srpc_stat + 1);
 
diff --git a/drivers/staging/lustre/lnet/selftest/framework.c 
b/drivers/staging/lustre/lnet/selftest/framework.c
index 5ca6712..436aef3 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -361,7 +361,7 @@
 sfw_get_stats(struct srpc_stat_reqst *request, struct srpc_stat_reply *reply)
 {
struct sfw_session *sn = sfw_data.fw_session;
-   sfw_counters_t *cnt = &reply->str_fw;
+   struct sfw_counters *cnt = &reply->str_fw;
struct sfw_batch *bat;
 
reply->str_sid = !sn ? LST_INVALID_SID : sn->sn_id;
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.h 
b/drivers/staging/lustre/lnet/selftest/rpc.h
index a5b44db..418c9c9 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.h
+++ b/drivers/staging/lustre/lnet/selftest/rpc.h
@@ -161,7 +161,7 @@ struct srpc_stat_reqst {
 struct srpc_stat_reply {
__u32  str_status;
struct lst_sid str_sid;
-   sfw_counters_t str_fw;
+   struct sfw_counters str_fw;
struct srpc_countersstr_rpc;
lnet_counters_tstr_lnet;
 } WIRE_ATTR;
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 33/34] staging: lustre: lnet: change srpc_counters_t to proper structure

2017-01-16 Thread James Simmons
Change srpc_counters_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/console.c | 4 ++--
 drivers/staging/lustre/lnet/selftest/rpc.c | 6 +++---
 drivers/staging/lustre/lnet/selftest/rpc.h | 2 +-
 drivers/staging/lustre/lnet/selftest/selftest.h| 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index a9c5b6d..575d23a 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -501,7 +501,7 @@ struct lst_test_ping_param {
int png_flags;  /* reserved flags */
 };
 
-typedef struct {
+struct srpc_counters {
__u32 errors;
__u32 rpcs_sent;
__u32 rpcs_rcvd;
@@ -509,7 +509,7 @@ struct lst_test_ping_param {
__u32 rpcs_expired;
__u64 bulk_get;
__u64 bulk_put;
-} WIRE_ATTR srpc_counters_t;
+} WIRE_ATTR;
 
 typedef struct {
/** milliseconds since current session started */
diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index b01023c..483a1bb 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -1468,14 +1468,14 @@ static void lstcon_group_ndlink_release(struct 
lstcon_group *,
 {
struct srpc_stat_reply *rep = &msg->msg_body.stat_reply;
sfw_counters_t __user *sfwk_stat;
-   srpc_counters_t __user *srpc_stat;
+   struct srpc_counters __user *srpc_stat;
lnet_counters_t __user *lnet_stat;
 
if (rep->str_status)
return 0;
 
sfwk_stat = (sfw_counters_t __user *)&ent_up->rpe_payload[0];
-   srpc_stat = (srpc_counters_t __user *)(sfwk_stat + 1);
+   srpc_stat = (struct srpc_counters __user *)(sfwk_stat + 1);
lnet_stat = (lnet_counters_t __user *)(srpc_stat + 1);
 
if (copy_to_user(sfwk_stat, &rep->str_fw, sizeof(*sfwk_stat)) ||
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c 
b/drivers/staging/lustre/lnet/selftest/rpc.c
index ce9de8c..92cd411 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.c
+++ b/drivers/staging/lustre/lnet/selftest/rpc.c
@@ -55,7 +55,7 @@ enum srpc_state {
struct srpc_service *rpc_services[SRPC_SERVICE_MAX_ID + 1];
lnet_handle_eq_t rpc_lnet_eq;   /* _the_ LNet event queue */
enum srpc_state  rpc_state;
-   srpc_counters_t  rpc_counters;
+   struct srpc_counters rpc_counters;
__u64rpc_matchbits; /* matchbits counter */
 } srpc_data;
 
@@ -69,14 +69,14 @@ enum srpc_state {
 /* forward ref's */
 int srpc_handle_rpc(struct swi_workitem *wi);
 
-void srpc_get_counters(srpc_counters_t *cnt)
+void srpc_get_counters(struct srpc_counters *cnt)
 {
spin_lock(&srpc_data.rpc_glock);
*cnt = srpc_data.rpc_counters;
spin_unlock(&srpc_data.rpc_glock);
 }
 
-void srpc_set_counters(const srpc_counters_t *cnt)
+void srpc_set_counters(const struct srpc_counters *cnt)
 {
spin_lock(&srpc_data.rpc_glock);
srpc_data.rpc_counters = *cnt;
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.h 
b/drivers/staging/lustre/lnet/selftest/rpc.h
index f2987c5..a5b44db 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.h
+++ b/drivers/staging/lustre/lnet/selftest/rpc.h
@@ -162,7 +162,7 @@ struct srpc_stat_reply {
__u32  str_status;
struct lst_sid str_sid;
sfw_counters_t str_fw;
-   srpc_counters_tstr_rpc;
+   struct srpc_countersstr_rpc;
lnet_counters_tstr_lnet;
 } WIRE_ATTR;
 
diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h 
b/drivers/staging/lustre/lnet/selftest/selftest.h
index 79b05aa..1e5526c 100644
--- a/drivers/staging/lustre/lnet/selftest/selftest.h
+++ b/drivers/staging/lustre/lnet/selftest/selftest.h
@@ -453,8 +453,8 @@ struct srpc_bulk *srpc_alloc_bulk(int cpt, unsigned int off,
 int srpc_finish_service(struct srpc_service *sv);
 int srpc_service_add_buffers(struct srpc_service *sv, int nbuffer);
 void srpc_service_remove_buffers(struct srpc_service *sv, int nbuffer);
-void srpc_get_counters(srpc_counters_t *cnt);
-void srpc_set_counters(const srpc_counters_t *cnt);
+void srpc_get_counters(struct srpc_counters *cnt);
+void srpc_set_counters(const struct srpc_counters *cnt);
 
 extern struct cfs_wi_sched *lst_sched_serial;
 extern struct cfs_wi_sched **lst_sched_test;
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/dri

[PATCH 15/34] staging: lustre: lnet: change lstio_group_del_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_group_del_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 7194552..2a02ce5 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -299,11 +299,11 @@ struct lstio_group_add_args {
char __user *lstio_grp_namep;   /* IN: group name */
 };
 
-typedef struct {
+struct lstio_group_del_args {
int  lstio_grp_key; /* IN: session key */
int  lstio_grp_nmlen;   /* IN: name length */
char __user *lstio_grp_namep;   /* IN: group name */
-} lstio_group_del_args_t;
+};
 
 #define LST_GROUP_CLEAN1   /* remove inactive nodes in the 
group */
 #define LST_GROUP_REFRESH  2   /* refresh inactive nodes
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index c3435b4..5a84c1f 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -223,7 +223,7 @@
 }
 
 static int
-lst_group_del_ioctl(lstio_group_del_args_t *args)
+lst_group_del_ioctl(struct lstio_group_del_args *args)
 {
int rc;
char *name;
@@ -870,7 +870,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_group_add_ioctl((struct lstio_group_add_args *)buf);
break;
case LSTIO_GROUP_DEL:
-   rc = lst_group_del_ioctl((lstio_group_del_args_t *)buf);
+   rc = lst_group_del_ioctl((struct lstio_group_del_args *)buf);
break;
case LSTIO_GROUP_UPDATE:
rc = lst_group_update_ioctl((lstio_group_update_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 26/34] staging: lustre: lnet: change lstio_batch_info_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_batch_info_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 5e594f6..3427512 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -406,7 +406,7 @@ struct lstio_batch_list_args {
char __user *lstio_bat_namep;   /* IN: batch name */
 };
 
-typedef struct {
+struct lstio_batch_info_args {
int  lstio_bat_key; /* IN: session key */
int  lstio_bat_nmlen;   /* IN: name length */
char __user *lstio_bat_namep;   /* IN: name */
@@ -418,7 +418,7 @@ struct lstio_batch_list_args {
int __user  *lstio_bat_idxp;/* IN/OUT: index of 
node */
int __user  *lstio_bat_ndentp;  /* IN/OUT: # of nodent 
*/
struct lstcon_node_ent __user *lstio_bat_dentsp;/* array of nodent */
-} lstio_batch_info_args_t;
+};
 
 /* add stat in session */
 typedef struct {
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index fd5eb7b..b76b62e 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -598,7 +598,7 @@
 }
 
 static int
-lst_batch_info_ioctl(lstio_batch_info_args_t *args)
+lst_batch_info_ioctl(struct lstio_batch_info_args *args)
 {
char *name;
int rc;
@@ -900,7 +900,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_batch_list_ioctl((struct lstio_batch_list_args *)buf);
break;
case LSTIO_BATCH_INFO:
-   rc = lst_batch_info_ioctl((lstio_batch_info_args_t *)buf);
+   rc = lst_batch_info_ioctl((struct lstio_batch_info_args *)buf);
break;
case LSTIO_TEST_ADD:
rc = lst_test_add_ioctl((lstio_test_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 27/34] staging: lustre: lnet: change lstio_stat_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_stat_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 3427512..27b2bde 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -421,7 +421,7 @@ struct lstio_batch_info_args {
 };
 
 /* add stat in session */
-typedef struct {
+struct lstio_stat_args {
int  lstio_sta_key; /* IN: session key */
int  lstio_sta_timeout; /* IN: timeout for
   stat request */
@@ -432,7 +432,7 @@ struct lstio_batch_info_args {
lnet_process_id_t __user *lstio_sta_idsp;   /* IN: pid */
struct list_head __user *lstio_sta_resultp; /* OUT: list head of
result buffer */
-} lstio_stat_args_t;
+};
 
 typedef enum {
LST_TEST_BULK   = 1,
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index b76b62e..9039f9f 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -662,7 +662,7 @@
 }
 
 static int
-lst_stat_query_ioctl(lstio_stat_args_t *args)
+lst_stat_query_ioctl(struct lstio_stat_args *args)
 {
int rc;
char *name = NULL;
@@ -906,7 +906,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_test_add_ioctl((lstio_test_args_t *)buf);
break;
case LSTIO_STAT_QUERY:
-   rc = lst_stat_query_ioctl((lstio_stat_args_t *)buf);
+   rc = lst_stat_query_ioctl((struct lstio_stat_args *)buf);
break;
default:
rc = -EINVAL;
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 32/34] staging: lustre: lnet: change lst_test_ping_param_t to proper structure

2017-01-16 Thread James Simmons
Change lst_test_ping_param_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conrpc.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index d59d7ba..a9c5b6d 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -494,12 +494,12 @@ struct lst_test_bulk_param {
int blk_srv_off;/* reserved: bulk offset on server */
 };
 
-typedef struct {
+struct lst_test_ping_param {
int png_size;   /* size of ping message */
int png_time;   /* time */
int png_loop;   /* loop */
int png_flags;  /* reserved flags */
-} lst_test_ping_param_t;
+};
 
 typedef struct {
__u32 errors;
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
b/drivers/staging/lustre/lnet/selftest/conrpc.c
index bcbe84e..3d325ea 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.c
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
@@ -768,7 +768,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
 }
 
 static int
-lstcon_pingrpc_prep(lst_test_ping_param_t *param, struct srpc_test_reqst *req)
+lstcon_pingrpc_prep(struct lst_test_ping_param *param, struct srpc_test_reqst 
*req)
 {
struct test_ping_req *prq = &req->tsr_u.ping;
 
@@ -891,7 +891,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
switch (test->tes_type) {
case LST_TEST_PING:
trq->tsr_service = SRPC_SERVICE_PING;
-   rc = lstcon_pingrpc_prep((lst_test_ping_param_t *)
+   rc = lstcon_pingrpc_prep((struct lst_test_ping_param *)
 &test->tes_param[0], trq);
break;
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 18/34] staging: lustre: lnet: change lstio_group_list_args_t to proper structure

2017-01-16 Thread James Simmons
Change lstio_group_list_args_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conctl.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index bee55a0..12aa7b6 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -334,12 +334,12 @@ struct lstio_group_nodes_args {
result buffer */
 };
 
-typedef struct {
+struct lstio_group_list_args {
int  lstio_grp_key; /* IN: session key */
int  lstio_grp_idx; /* IN: group idx */
int  lstio_grp_nmlen;   /* IN: name len */
char __user *lstio_grp_namep;   /* OUT: name */
-} lstio_group_list_args_t;
+};
 
 typedef struct {
int  lstio_grp_key; /* IN: session key */
diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c 
b/drivers/staging/lustre/lnet/selftest/conctl.c
index fe42e63..a2513d8 100644
--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -358,7 +358,7 @@
 }
 
 static int
-lst_group_list_ioctl(lstio_group_list_args_t *args)
+lst_group_list_ioctl(struct lstio_group_list_args *args)
 {
if (args->lstio_grp_key != console_session.ses_key)
return -EACCES;
@@ -879,7 +879,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
rc = lst_nodes_add_ioctl((struct lstio_group_nodes_args *)buf);
break;
case LSTIO_GROUP_LIST:
-   rc = lst_group_list_ioctl((lstio_group_list_args_t *)buf);
+   rc = lst_group_list_ioctl((struct lstio_group_list_args *)buf);
break;
case LSTIO_GROUP_INFO:
rc = lst_group_info_ioctl((lstio_group_info_args_t *)buf);
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 28/34] staging: lustre: lnet: change lst_test_type_t to proper enum

2017-01-16 Thread James Simmons
Change lst_test_type_t from typedef to proper enum.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 27b2bde..495cc01 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -434,10 +434,10 @@ struct lstio_stat_args {
result buffer */
 };
 
-typedef enum {
+enum lst_test_type {
LST_TEST_BULK   = 1,
LST_TEST_PING   = 2
-} lst_test_type_t;
+};
 
 /* create a test in a batch */
 #define LST_MAX_CONCUR 1024/* Max concurrency of test */
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 31/34] staging: lustre: lnet: change lst_test_bulk_param_t to proper structure

2017-01-16 Thread James Simmons
Change lst_test_bulk_param_t from typedef to proper structure.

Signed-off-by: James Simmons 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger 
Reviewed-by: Doug Oucharek 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/lnet/lnetst.h | 4 ++--
 drivers/staging/lustre/lnet/selftest/conrpc.c  | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h 
b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 0279e09..d59d7ba 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -485,14 +485,14 @@ enum lst_brw_flags {
LST_BRW_CHECK_FULL  = 3
 };
 
-typedef struct {
+struct lst_test_bulk_param {
int blk_opc;/* bulk operation code */
int blk_size;   /* size (bytes) */
int blk_time;   /* time of running the test*/
int blk_flags;  /* reserved flags */
int blk_cli_off;/* bulk offset on client */
int blk_srv_off;/* reserved: bulk offset on server */
-} lst_test_bulk_param_t;
+};
 
 typedef struct {
int png_size;   /* size of ping message */
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
b/drivers/staging/lustre/lnet/selftest/conrpc.c
index 3b97915..bcbe84e 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.c
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
@@ -779,7 +779,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
 }
 
 static int
-lstcon_bulkrpc_v0_prep(lst_test_bulk_param_t *param,
+lstcon_bulkrpc_v0_prep(struct lst_test_bulk_param *param,
   struct srpc_test_reqst *req)
 {
struct test_bulk_req *brq = &req->tsr_u.bulk_v0;
@@ -793,7 +793,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
 }
 
 static int
-lstcon_bulkrpc_v1_prep(lst_test_bulk_param_t *param, bool is_client,
+lstcon_bulkrpc_v1_prep(struct lst_test_bulk_param *param, bool is_client,
   struct srpc_test_reqst *req)
 {
struct test_bulk_req_v1 *brq = &req->tsr_u.bulk_v1;
@@ -898,10 +898,10 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, 
struct srpc_msg *,
case LST_TEST_BULK:
trq->tsr_service = SRPC_SERVICE_BRW;
if (!(feats & LST_FEAT_BULK_LEN)) {
-   rc = lstcon_bulkrpc_v0_prep((lst_test_bulk_param_t *)
+   rc = lstcon_bulkrpc_v0_prep((struct lst_test_bulk_param 
*)
&test->tes_param[0], trq);
} else {
-   rc = lstcon_bulkrpc_v1_prep((lst_test_bulk_param_t *)
+   rc = lstcon_bulkrpc_v1_prep((struct lst_test_bulk_param 
*)
&test->tes_param[0],
trq->tsr_is_client, trq);
}
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: lustre: headers: potential UAPI headers

2017-01-16 Thread Greg Kroah-Hartman
On Mon, Jan 16, 2017 at 09:28:30PM +, James Simmons wrote:
> 
> > On Mon, Dec 19, 2016 at 12:06:47PM -0500, James Simmons wrote:
> > > Not for landing. This is the purposed UAPI headers
> > > with the removal of unlikely and debugging macros.
> > > This is just for feedback to see if this is acceptable
> > > for the upstream client.
> > > 
> > > Signed-off-by: James Simmons 
> > > ---
> > >  .../lustre/lustre/include/lustre/lustre_fid.h  | 353 
> > > +
> > >  .../lustre/lustre/include/lustre/lustre_ostid.h| 233 ++
> > 
> > Can you make a lustre "uapi" directory so we can see which files you
> > really want to be UAPI and which you don't as time goes on?
> 
> Where do you want them placed? In uapi/linux/lustre or uapi/lustre. Does
> it matter to you? The below was to forth coming UAPI headers which from
> your response you seem okay with in general.

How many .h files are there going to be?  It's just a single filesystem,
shouldn't you just need a single file?  If so, how about
drivers/staging/lustre/include/uapi/lustre.h
?

If you really need multiple .h files, put them all in the same uapi/
directory with a lustre_ prefix, you don't need a whole subdir just for
yourself, right?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel