linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5]fpga: fix for coding style and kernel-doc issues
@ 2022-04-03  5:16 Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type Nava kishore Manne
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-03  5:16 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, michal.simek, linux-fpga,
	linux-kernel, linux-arm-kernel, git
  Cc: Nava kishore Manne

This patch series fixes the coding style and kernel-doc issues
exists in the fpga framework, zynq and ZynqMP drivers.

Nava kishore Manne (5):
  fpga: zynq: Fix incorrect variable type
  fpga: fix for coding style issues
  fpga: fpga-mgr: Add missing kernel-doc description
  fpga: Use tab instead of space indentation
  fpga: fpga-region: Add missing kernel-doc description

 drivers/fpga/Makefile         |  6 +++---
 drivers/fpga/fpga-mgr.c       |  8 ++++++--
 drivers/fpga/fpga-region.c    |  7 ++++---
 drivers/fpga/of-fpga-region.c | 16 +++++++++-------
 drivers/fpga/zynq-fpga.c      |  8 ++++----
 5 files changed, 26 insertions(+), 19 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type
  2022-04-03  5:16 [PATCH v3 0/5]fpga: fix for coding style and kernel-doc issues Nava kishore Manne
@ 2022-04-03  5:16 ` Nava kishore Manne
  2022-04-05  4:38   ` Xu Yilun
  2022-04-03  5:16 ` [PATCH v3 2/5] fpga: fix for coding style issues Nava kishore Manne
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-03  5:16 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, michal.simek, linux-fpga,
	linux-kernel, linux-arm-kernel, git
  Cc: Nava kishore Manne

zynq_fpga_has_sync () API is expecting "u8 *" but the
formal parameter that was passed is of type "const char *".
fixes this issue by changing the buf type to "const char *"

This patch will also update zynq_fpga_has_sync () API description
to align with API functionality.

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
---
Changes for v2:
                -None.
Changes for v3:
               - Changed arg buf type to "const char *" as suggested by Tom.

 drivers/fpga/zynq-fpga.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c
index 426aa34c6a0d..ada07eea64bc 100644
--- a/drivers/fpga/zynq-fpga.c
+++ b/drivers/fpga/zynq-fpga.c
@@ -235,11 +235,11 @@ static irqreturn_t zynq_fpga_isr(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-/* Sanity check the proposed bitstream. It must start with the sync word in
- * the correct byte order, and be dword aligned. The input is a Xilinx .bin
- * file with every 32 bit quantity swapped.
+/* Sanity check the proposed bitstream. The sync word must be found in the
+ * correct byte order and it should be dword aligned. The input is a
+ * Xilinx.bin file with every 32 bit quantity swapped.
  */
-static bool zynq_fpga_has_sync(const u8 *buf, size_t count)
+static bool zynq_fpga_has_sync(const char *buf, size_t count)
 {
 	for (; count >= 4; buf += 4, count -= 4)
 		if (buf[0] == 0x66 && buf[1] == 0x55 && buf[2] == 0x99 &&
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v3 2/5] fpga: fix for coding style issues
  2022-04-03  5:16 [PATCH v3 0/5]fpga: fix for coding style and kernel-doc issues Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type Nava kishore Manne
@ 2022-04-03  5:16 ` Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 3/5] fpga: fpga-mgr: Add missing kernel-doc description Nava kishore Manne
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-03  5:16 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, michal.simek, linux-fpga,
	linux-kernel, linux-arm-kernel, git
  Cc: Nava kishore Manne

fixes the below checks reported by checkpatch.pl
Lines should not end with a '('
Alignment should match open parenthesis

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
---
Changes for v2:
                -None.
Changes for v3:
               -Fixed similar issue exists in "drivers/fpga/*".

 drivers/fpga/fpga-mgr.c    | 4 ++--
 drivers/fpga/fpga-region.c | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index d49a9ce34568..a699cc8e2fa6 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -151,8 +151,8 @@ static int fpga_mgr_write_init_buf(struct fpga_manager *mgr,
 	if (!mgr->mops->initial_header_size)
 		ret = fpga_mgr_write_init(mgr, info, NULL, 0);
 	else
-		ret = fpga_mgr_write_init(
-		    mgr, info, buf, min(mgr->mops->initial_header_size, count));
+		ret = fpga_mgr_write_init(mgr, info, buf,
+					  min(mgr->mops->initial_header_size, count));
 
 	if (ret) {
 		dev_err(&mgr->dev, "Error preparing FPGA for writing\n");
diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c
index b0ac18de4885..3864bf4f8920 100644
--- a/drivers/fpga/fpga-region.c
+++ b/drivers/fpga/fpga-region.c
@@ -18,9 +18,10 @@
 static DEFINE_IDA(fpga_region_ida);
 static struct class *fpga_region_class;
 
-struct fpga_region *fpga_region_class_find(
-	struct device *start, const void *data,
-	int (*match)(struct device *, const void *))
+struct fpga_region *fpga_region_class_find(struct device *start,
+					   const void *data,
+					   int (*match)(struct device *,
+							const void *))
 {
 	struct device *dev;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v3 3/5] fpga: fpga-mgr: Add missing kernel-doc description
  2022-04-03  5:16 [PATCH v3 0/5]fpga: fix for coding style and kernel-doc issues Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 2/5] fpga: fix for coding style issues Nava kishore Manne
@ 2022-04-03  5:16 ` Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 4/5] fpga: Use tab instead of space indentation Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description Nava kishore Manne
  4 siblings, 0 replies; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-03  5:16 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, michal.simek, linux-fpga,
	linux-kernel, linux-arm-kernel, git
  Cc: Nava kishore Manne

Fixed the warnings: No description found for return value of 'xxx'

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
---
Changes for v2:
                -Replaced s/@return:/Return:/
Changes for v3:
               -Updated commit description.

 drivers/fpga/fpga-mgr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index a699cc8e2fa6..0f2b28538f17 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -730,6 +730,8 @@ static void devm_fpga_mgr_unregister(struct device *dev, void *res)
  * @parent:	fpga manager device from pdev
  * @info:	parameters for fpga manager
  *
+ * Return:  fpga manager pointer on success, negative error code otherwise.
+ *
  * This is the devres variant of fpga_mgr_register_full() for which the unregister
  * function will be called automatically when the managing device is detached.
  */
@@ -763,6 +765,8 @@ EXPORT_SYMBOL_GPL(devm_fpga_mgr_register_full);
  * @mops:	pointer to structure of fpga manager ops
  * @priv:	fpga manager private data
  *
+ * Return:  fpga manager pointer on success, negative error code otherwise.
+ *
  * This is the devres variant of fpga_mgr_register() for which the
  * unregister function will be called automatically when the managing
  * device is detached.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v3 4/5] fpga: Use tab instead of space indentation
  2022-04-03  5:16 [PATCH v3 0/5]fpga: fix for coding style and kernel-doc issues Nava kishore Manne
                   ` (2 preceding siblings ...)
  2022-04-03  5:16 ` [PATCH v3 3/5] fpga: fpga-mgr: Add missing kernel-doc description Nava kishore Manne
@ 2022-04-03  5:16 ` Nava kishore Manne
  2022-04-03  5:16 ` [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description Nava kishore Manne
  4 siblings, 0 replies; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-03  5:16 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, michal.simek, linux-fpga,
	linux-kernel, linux-arm-kernel, git
  Cc: Nava kishore Manne

In FPGA Make file has both space and tab indentation to
make them align use tab instead of space indentation.

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
---
Changes for v2:
                -None.
Changes for v3:
                -Updated commit description.

 drivers/fpga/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile
index 0bff783d1b61..5935b3d0abd5 100644
--- a/drivers/fpga/Makefile
+++ b/drivers/fpga/Makefile
@@ -18,9 +18,9 @@ obj-$(CONFIG_FPGA_MGR_TS73XX)		+= ts73xx-fpga.o
 obj-$(CONFIG_FPGA_MGR_XILINX_SPI)	+= xilinx-spi.o
 obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA)	+= zynq-fpga.o
 obj-$(CONFIG_FPGA_MGR_ZYNQMP_FPGA)	+= zynqmp-fpga.o
-obj-$(CONFIG_FPGA_MGR_VERSAL_FPGA)      += versal-fpga.o
-obj-$(CONFIG_ALTERA_PR_IP_CORE)         += altera-pr-ip-core.o
-obj-$(CONFIG_ALTERA_PR_IP_CORE_PLAT)    += altera-pr-ip-core-plat.o
+obj-$(CONFIG_FPGA_MGR_VERSAL_FPGA)	+= versal-fpga.o
+obj-$(CONFIG_ALTERA_PR_IP_CORE)		+= altera-pr-ip-core.o
+obj-$(CONFIG_ALTERA_PR_IP_CORE_PLAT)	+= altera-pr-ip-core-plat.o
 
 # FPGA Bridge Drivers
 obj-$(CONFIG_FPGA_BRIDGE)		+= fpga-bridge.o
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description
  2022-04-03  5:16 [PATCH v3 0/5]fpga: fix for coding style and kernel-doc issues Nava kishore Manne
                   ` (3 preceding siblings ...)
  2022-04-03  5:16 ` [PATCH v3 4/5] fpga: Use tab instead of space indentation Nava kishore Manne
@ 2022-04-03  5:16 ` Nava kishore Manne
  2022-04-05  5:35   ` Xu Yilun
  4 siblings, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-03  5:16 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, michal.simek, linux-fpga,
	linux-kernel, linux-arm-kernel, git
  Cc: Nava kishore Manne

Fixed the warnings: No description found for return value of 'xxx'

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
---
Changes for v2:
                -Replaced s/@return:/Return:/
Changes for v3:
               -Updated commit description.

 drivers/fpga/of-fpga-region.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c
index 50b83057c048..9e330a2c0a1b 100644
--- a/drivers/fpga/of-fpga-region.c
+++ b/drivers/fpga/of-fpga-region.c
@@ -28,7 +28,7 @@ MODULE_DEVICE_TABLE(of, fpga_region_of_match);
  *
  * Caller will need to put_device(&region->dev) when done.
  *
- * Returns FPGA Region struct or NULL
+ * Return: FPGA Region struct or NULL
  */
 static struct fpga_region *of_fpga_region_find(struct device_node *np)
 {
@@ -80,7 +80,7 @@ static struct fpga_manager *of_fpga_region_get_mgr(struct device_node *np)
  * Caller should call fpga_bridges_put(&region->bridge_list) when
  * done with the bridges.
  *
- * Return 0 for success (even if there are no bridges specified)
+ * Return: 0 for success (even if there are no bridges specified)
  * or -EBUSY if any of the bridges are in use.
  */
 static int of_fpga_region_get_bridges(struct fpga_region *region)
@@ -139,13 +139,13 @@ static int of_fpga_region_get_bridges(struct fpga_region *region)
 }
 
 /**
- * child_regions_with_firmware
+ * child_regions_with_firmware - Used to check the child region info.
  * @overlay: device node of the overlay
  *
  * If the overlay adds child FPGA regions, they are not allowed to have
  * firmware-name property.
  *
- * Return 0 for OK or -EINVAL if child FPGA region adds firmware-name.
+ * Return: 0 for OK or -EINVAL if child FPGA region adds firmware-name.
  */
 static int child_regions_with_firmware(struct device_node *overlay)
 {
@@ -184,7 +184,7 @@ static int child_regions_with_firmware(struct device_node *overlay)
  * Given an overlay applied to an FPGA region, parse the FPGA image specific
  * info in the overlay and do some checking.
  *
- * Returns:
+ * Return:
  *   NULL if overlay doesn't direct us to program the FPGA.
  *   fpga_image_info struct if there is an image to program.
  *   error code for invalid overlay.
@@ -279,7 +279,7 @@ static struct fpga_image_info *of_fpga_region_parse_ov(
  * If the checks fail, overlay is rejected and does not get added to the
  * live tree.
  *
- * Returns 0 for success or negative error code for failure.
+ * Return: 0 for success or negative error code for failure.
  */
 static int of_fpga_region_notify_pre_apply(struct fpga_region *region,
 					   struct of_overlay_notify_data *nd)
@@ -339,7 +339,7 @@ static void of_fpga_region_notify_post_remove(struct fpga_region *region,
  * This notifier handles programming an FPGA when a "firmware-name" property is
  * added to an fpga-region.
  *
- * Returns NOTIFY_OK or error if FPGA programming fails.
+ * Return: NOTIFY_OK or error if FPGA programming fails.
  */
 static int of_fpga_region_notify(struct notifier_block *nb,
 				 unsigned long action, void *arg)
@@ -446,6 +446,8 @@ static struct platform_driver of_fpga_region_driver = {
 /**
  * of_fpga_region_init - init function for fpga_region class
  * Creates the fpga_region class and registers a reconfig notifier.
+ *
+ * Return: 0 on success, negative error code otherwise.
  */
 static int __init of_fpga_region_init(void)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type
  2022-04-03  5:16 ` [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type Nava kishore Manne
@ 2022-04-05  4:38   ` Xu Yilun
  2022-04-05 16:00     ` Russ Weight
  0 siblings, 1 reply; 12+ messages in thread
From: Xu Yilun @ 2022-04-05  4:38 UTC (permalink / raw)
  To: Nava kishore Manne
  Cc: mdf, hao.wu, trix, michal.simek, linux-fpga, linux-kernel,
	linux-arm-kernel, git

On Sun, Apr 03, 2022 at 10:46:37AM +0530, Nava kishore Manne wrote:
> zynq_fpga_has_sync () API is expecting "u8 *" but the
> formal parameter that was passed is of type "const char *".
> fixes this issue by changing the buf type to "const char *"

  Fix

> 
> This patch will also update zynq_fpga_has_sync () API description
> to align with API functionality.
> 
> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> ---
> Changes for v2:
>                 -None.
> Changes for v3:
>                - Changed arg buf type to "const char *" as suggested by Tom.
> 
>  drivers/fpga/zynq-fpga.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c
> index 426aa34c6a0d..ada07eea64bc 100644
> --- a/drivers/fpga/zynq-fpga.c
> +++ b/drivers/fpga/zynq-fpga.c
> @@ -235,11 +235,11 @@ static irqreturn_t zynq_fpga_isr(int irq, void *data)
>  	return IRQ_HANDLED;
>  }
>  
> -/* Sanity check the proposed bitstream. It must start with the sync word in
> - * the correct byte order, and be dword aligned. The input is a Xilinx .bin
> - * file with every 32 bit quantity swapped.
> +/* Sanity check the proposed bitstream. The sync word must be found in the
> + * correct byte order and it should be dword aligned. The input is a
> + * Xilinx.bin file with every 32 bit quantity swapped.

I didn't found these changes in v2, or in change logs. Please record it.

Sorry, as a foreign English user, I didn't find the necessity of the change.
The previous words are as clear as the current. Anyone could help?

And they are not for variable type fix. Please make a separate patch if
really needed.

Thanks,
Yilun

>   */
> -static bool zynq_fpga_has_sync(const u8 *buf, size_t count)
> +static bool zynq_fpga_has_sync(const char *buf, size_t count)
>  {
>  	for (; count >= 4; buf += 4, count -= 4)
>  		if (buf[0] == 0x66 && buf[1] == 0x55 && buf[2] == 0x99 &&
> -- 
> 2.25.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description
  2022-04-03  5:16 ` [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description Nava kishore Manne
@ 2022-04-05  5:35   ` Xu Yilun
  2022-04-07  5:31     ` Nava kishore Manne
  0 siblings, 1 reply; 12+ messages in thread
From: Xu Yilun @ 2022-04-05  5:35 UTC (permalink / raw)
  To: Nava kishore Manne
  Cc: mdf, hao.wu, trix, michal.simek, linux-fpga, linux-kernel,
	linux-arm-kernel, git

On Sun, Apr 03, 2022 at 10:46:41AM +0530, Nava kishore Manne wrote:
> Fixed the warnings: No description found for return value of 'xxx'

The commit message is not clear. There are descriptions for some
functions, but not in right format.

Thanks,
Yilun

> 
> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> ---
> Changes for v2:
>                 -Replaced s/@return:/Return:/
> Changes for v3:
>                -Updated commit description.
> 
>  drivers/fpga/of-fpga-region.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c
> index 50b83057c048..9e330a2c0a1b 100644
> --- a/drivers/fpga/of-fpga-region.c
> +++ b/drivers/fpga/of-fpga-region.c
> @@ -28,7 +28,7 @@ MODULE_DEVICE_TABLE(of, fpga_region_of_match);
>   *
>   * Caller will need to put_device(&region->dev) when done.
>   *
> - * Returns FPGA Region struct or NULL
> + * Return: FPGA Region struct or NULL
>   */
>  static struct fpga_region *of_fpga_region_find(struct device_node *np)
>  {
> @@ -80,7 +80,7 @@ static struct fpga_manager *of_fpga_region_get_mgr(struct device_node *np)
>   * Caller should call fpga_bridges_put(&region->bridge_list) when
>   * done with the bridges.
>   *
> - * Return 0 for success (even if there are no bridges specified)
> + * Return: 0 for success (even if there are no bridges specified)
>   * or -EBUSY if any of the bridges are in use.
>   */
>  static int of_fpga_region_get_bridges(struct fpga_region *region)
> @@ -139,13 +139,13 @@ static int of_fpga_region_get_bridges(struct fpga_region *region)
>  }
>  
>  /**
> - * child_regions_with_firmware
> + * child_regions_with_firmware - Used to check the child region info.
>   * @overlay: device node of the overlay
>   *
>   * If the overlay adds child FPGA regions, they are not allowed to have
>   * firmware-name property.
>   *
> - * Return 0 for OK or -EINVAL if child FPGA region adds firmware-name.
> + * Return: 0 for OK or -EINVAL if child FPGA region adds firmware-name.
>   */
>  static int child_regions_with_firmware(struct device_node *overlay)
>  {
> @@ -184,7 +184,7 @@ static int child_regions_with_firmware(struct device_node *overlay)
>   * Given an overlay applied to an FPGA region, parse the FPGA image specific
>   * info in the overlay and do some checking.
>   *
> - * Returns:
> + * Return:
>   *   NULL if overlay doesn't direct us to program the FPGA.
>   *   fpga_image_info struct if there is an image to program.
>   *   error code for invalid overlay.
> @@ -279,7 +279,7 @@ static struct fpga_image_info *of_fpga_region_parse_ov(
>   * If the checks fail, overlay is rejected and does not get added to the
>   * live tree.
>   *
> - * Returns 0 for success or negative error code for failure.
> + * Return: 0 for success or negative error code for failure.
>   */
>  static int of_fpga_region_notify_pre_apply(struct fpga_region *region,
>  					   struct of_overlay_notify_data *nd)
> @@ -339,7 +339,7 @@ static void of_fpga_region_notify_post_remove(struct fpga_region *region,
>   * This notifier handles programming an FPGA when a "firmware-name" property is
>   * added to an fpga-region.
>   *
> - * Returns NOTIFY_OK or error if FPGA programming fails.
> + * Return: NOTIFY_OK or error if FPGA programming fails.
>   */
>  static int of_fpga_region_notify(struct notifier_block *nb,
>  				 unsigned long action, void *arg)
> @@ -446,6 +446,8 @@ static struct platform_driver of_fpga_region_driver = {
>  /**
>   * of_fpga_region_init - init function for fpga_region class
>   * Creates the fpga_region class and registers a reconfig notifier.
> + *
> + * Return: 0 on success, negative error code otherwise.
>   */
>  static int __init of_fpga_region_init(void)
>  {
> -- 
> 2.25.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type
  2022-04-05  4:38   ` Xu Yilun
@ 2022-04-05 16:00     ` Russ Weight
  0 siblings, 0 replies; 12+ messages in thread
From: Russ Weight @ 2022-04-05 16:00 UTC (permalink / raw)
  To: Xu Yilun, Nava kishore Manne
  Cc: mdf, hao.wu, trix, michal.simek, linux-fpga, linux-kernel,
	linux-arm-kernel, git



On 4/4/22 21:38, Xu Yilun wrote:
> On Sun, Apr 03, 2022 at 10:46:37AM +0530, Nava kishore Manne wrote:
>> zynq_fpga_has_sync () API is expecting "u8 *" but the
>> formal parameter that was passed is of type "const char *".
>> fixes this issue by changing the buf type to "const char *"
>   Fix
>
>> This patch will also update zynq_fpga_has_sync () API description
>> to align with API functionality.
>>
>> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
>> ---
>> Changes for v2:
>>                 -None.
>> Changes for v3:
>>                - Changed arg buf type to "const char *" as suggested by Tom.
>>
>>  drivers/fpga/zynq-fpga.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c
>> index 426aa34c6a0d..ada07eea64bc 100644
>> --- a/drivers/fpga/zynq-fpga.c
>> +++ b/drivers/fpga/zynq-fpga.c
>> @@ -235,11 +235,11 @@ static irqreturn_t zynq_fpga_isr(int irq, void *data)
>>  	return IRQ_HANDLED;
>>  }
>>  
>> -/* Sanity check the proposed bitstream. It must start with the sync word in
>> - * the correct byte order, and be dword aligned. The input is a Xilinx .bin
>> - * file with every 32 bit quantity swapped.
>> +/* Sanity check the proposed bitstream. The sync word must be found in the
>> + * correct byte order and it should be dword aligned. The input is a
>> + * Xilinx.bin file with every 32 bit quantity swapped.
> I didn't found these changes in v2, or in change logs. Please record it.
>
> Sorry, as a foreign English user, I didn't find the necessity of the change.
> The previous words are as clear as the current. Anyone could help?

I think the change adds a little clarity to the second sentence.

- Russ
>
> And they are not for variable type fix. Please make a separate patch if
> really needed.
>
> Thanks,
> Yilun
>
>>   */
>> -static bool zynq_fpga_has_sync(const u8 *buf, size_t count)
>> +static bool zynq_fpga_has_sync(const char *buf, size_t count)
>>  {
>>  	for (; count >= 4; buf += 4, count -= 4)
>>  		if (buf[0] == 0x66 && buf[1] == 0x55 && buf[2] == 0x99 &&
>> -- 
>> 2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description
  2022-04-05  5:35   ` Xu Yilun
@ 2022-04-07  5:31     ` Nava kishore Manne
  2022-04-07  6:48       ` Xu Yilun
  0 siblings, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-07  5:31 UTC (permalink / raw)
  To: Xu Yilun
  Cc: mdf, hao.wu, trix, Michal Simek, linux-fpga, linux-kernel,
	linux-arm-kernel, git

Hi Yilun,

	Thanks for providing the review comments.
Please find my response inline.

> -----Original Message-----
> From: Xu Yilun <yilun.xu@intel.com>
> Sent: Tuesday, April 5, 2022 11:06 AM
> To: Nava kishore Manne <navam@xilinx.com>
> Cc: mdf@kernel.org; hao.wu@intel.com; trix@redhat.com; Michal Simek
> <michals@xilinx.com>; linux-fpga@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; git
> <git@xilinx.com>
> Subject: Re: [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc
> description
> 
> On Sun, Apr 03, 2022 at 10:46:41AM +0530, Nava kishore Manne wrote:
> > Fixed the warnings: No description found for return value of 'xxx'
> 
> The commit message is not clear. There are descriptions for some functions,
> but not in right format.
> 
I agree for some functions has description but not in the right format.
The "Description Not exits" and  "Description not in the right format" in both cases the tool will report the same warning ie; " warnings: No description found for return value of 'xxx'"
This patch address the above warning. So to make it relevant I have added the same in the commit msg.

Regards,
Navakishore.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description
  2022-04-07  5:31     ` Nava kishore Manne
@ 2022-04-07  6:48       ` Xu Yilun
  2022-04-16 13:18         ` Nava kishore Manne
  0 siblings, 1 reply; 12+ messages in thread
From: Xu Yilun @ 2022-04-07  6:48 UTC (permalink / raw)
  To: Nava kishore Manne
  Cc: mdf, hao.wu, trix, Michal Simek, linux-fpga, linux-kernel,
	linux-arm-kernel, git

On Thu, Apr 07, 2022 at 05:31:39AM +0000, Nava kishore Manne wrote:
> Hi Yilun,
> 
> 	Thanks for providing the review comments.
> Please find my response inline.
> 
> > -----Original Message-----
> > From: Xu Yilun <yilun.xu@intel.com>
> > Sent: Tuesday, April 5, 2022 11:06 AM
> > To: Nava kishore Manne <navam@xilinx.com>
> > Cc: mdf@kernel.org; hao.wu@intel.com; trix@redhat.com; Michal Simek
> > <michals@xilinx.com>; linux-fpga@vger.kernel.org; linux-
> > kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; git
> > <git@xilinx.com>
> > Subject: Re: [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc
> > description
> > 
> > On Sun, Apr 03, 2022 at 10:46:41AM +0530, Nava kishore Manne wrote:
> > > Fixed the warnings: No description found for return value of 'xxx'
> > 
> > The commit message is not clear. There are descriptions for some functions,
> > but not in right format.
> > 
> I agree for some functions has description but not in the right format.
> The "Description Not exits" and  "Description not in the right format" in both cases the tool will report the same warning ie; " warnings: No description found for return value of 'xxx'"

Thanks for the info. It would be better we describe the root cause in commit
message along with the robot reports.

And also change the subject please.

> This patch address the above warning. So to make it relevant I have added the same in the commit msg.

Adding the same commit message may not be a good way, for this case you could
just combine them into one commit.

Thanks,
Yilun

> 
> Regards,
> Navakishore.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description
  2022-04-07  6:48       ` Xu Yilun
@ 2022-04-16 13:18         ` Nava kishore Manne
  0 siblings, 0 replies; 12+ messages in thread
From: Nava kishore Manne @ 2022-04-16 13:18 UTC (permalink / raw)
  To: Xu Yilun
  Cc: mdf, hao.wu, trix, Michal Simek, linux-fpga, linux-kernel,
	linux-arm-kernel, git

Hi Yilun,

> -----Original Message-----
> From: Xu Yilun <yilun.xu@intel.com>
> Sent: Thursday, April 7, 2022 12:18 PM
> To: Nava kishore Manne <navam@xilinx.com>
> Cc: mdf@kernel.org; hao.wu@intel.com; trix@redhat.com; Michal Simek
> <michals@xilinx.com>; linux-fpga@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; git
> <git@xilinx.com>
> Subject: Re: [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc
> description
> 
> On Thu, Apr 07, 2022 at 05:31:39AM +0000, Nava kishore Manne wrote:
> > Hi Yilun,
> >
> > 	Thanks for providing the review comments.
> > Please find my response inline.
> >
> > > -----Original Message-----
> > > From: Xu Yilun <yilun.xu@intel.com>
> > > Sent: Tuesday, April 5, 2022 11:06 AM
> > > To: Nava kishore Manne <navam@xilinx.com>
> > > Cc: mdf@kernel.org; hao.wu@intel.com; trix@redhat.com; Michal Simek
> > > <michals@xilinx.com>; linux-fpga@vger.kernel.org; linux-
> > > kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; git
> > > <git@xilinx.com>
> > > Subject: Re: [PATCH v3 5/5] fpga: fpga-region: Add missing
> > > kernel-doc description
> > >
> > > On Sun, Apr 03, 2022 at 10:46:41AM +0530, Nava kishore Manne wrote:
> > > > Fixed the warnings: No description found for return value of 'xxx'
> > >
> > > The commit message is not clear. There are descriptions for some
> > > functions, but not in right format.
> > >
> > I agree for some functions has description but not in the right format.
> > The "Description Not exits" and  "Description not in the right format" in
> both cases the tool will report the same warning ie; " warnings: No
> description found for return value of 'xxx'"
> 
> Thanks for the info. It would be better we describe the root cause in commit
> message along with the robot reports.
> 
> And also change the subject please.
> 
Will fix
> > This patch address the above warning. So to make it relevant I have added
> the same in the commit msg.
> 
> Adding the same commit message may not be a good way, for this case you
> could just combine them into one commit.
> 
Will fix.

Regards,
Navakishore.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-04-16 13:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03  5:16 [PATCH v3 0/5]fpga: fix for coding style and kernel-doc issues Nava kishore Manne
2022-04-03  5:16 ` [PATCH v3 1/5] fpga: zynq: Fix incorrect variable type Nava kishore Manne
2022-04-05  4:38   ` Xu Yilun
2022-04-05 16:00     ` Russ Weight
2022-04-03  5:16 ` [PATCH v3 2/5] fpga: fix for coding style issues Nava kishore Manne
2022-04-03  5:16 ` [PATCH v3 3/5] fpga: fpga-mgr: Add missing kernel-doc description Nava kishore Manne
2022-04-03  5:16 ` [PATCH v3 4/5] fpga: Use tab instead of space indentation Nava kishore Manne
2022-04-03  5:16 ` [PATCH v3 5/5] fpga: fpga-region: Add missing kernel-doc description Nava kishore Manne
2022-04-05  5:35   ` Xu Yilun
2022-04-07  5:31     ` Nava kishore Manne
2022-04-07  6:48       ` Xu Yilun
2022-04-16 13:18         ` Nava kishore Manne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).