* [Intel-wired-lan] [PATCH 00/35] Reorganize kerneldoc parameter names
@ 2024-09-30 11:20 Julia Lawall
2024-09-30 11:21 ` [Intel-wired-lan] [PATCH 33/35] drivers/net/ethernet/intel: " Julia Lawall
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Julia Lawall @ 2024-09-30 11:20 UTC (permalink / raw)
To: linux-gpio
Cc: nvdimm, alsa-devel, Jan Kara, Rafael J. Wysocki, Neil Brown,
linux-pci, kernel-janitors, dri-devel, linux-mm, linux-mtd,
amd-gfx, linux-leds, drbd-dev, Pierre-Louis Bossart, dccp,
Dai Ngo, Christophe Leroy, iommu, intel-wired-lan, Robin Murphy,
Olga Kornievskaia, linux-arm-msm, Naveen N Rao, linux-sound,
maple-tree, Tom Talpey, Madhavan Srinivasan, Mathieu Desnoyers,
Nicholas Piggin, linux-omap, Zhihao Cheng, linux-arm-kernel,
linux-nfs, netdev, linux-usb, linux-wireless, linux-kernel, audit,
tipc-discussion, linux-fsdevel, Sanyog Kale, linux-trace-kernel,
linuxppc-dev
Reorganize kerneldoc parameter names to match the parameter
order in the function header.
The misordered cases were identified using the following
Coccinelle semantic patch:
// <smpl>
@initialize:ocaml@
@@
let parse_doc l =
let pieces = List.map String.trim (String.split_on_char '*' l) in
let l = String.concat " " pieces in
match String.split_on_char ':' l with
x::xs -> x
| _ -> ""
let params ps =
List.rev
(List.fold_left
(fun prev (pm,_) ->
let ty =
String.trim(Pretty_print_c.string_of_fullType pm.Ast_c.p_type) in
if ty = "void" && pm.Ast_c.p_namei = None
then prev
else
let name =
match pm.Ast_c.p_namei with
Some name -> name
| None -> failwith "function parameter has no name" in
(String.trim (Pretty_print_c.string_of_name name),ty)::prev)
[] ps)
@r@
comments c;
identifier fn;
position p;
parameter list ps;
type T;
@@
T@c fn@p(ps) { ... }
@script:ocaml@
p << r.p;
c << r.c;
(_,ps) << r.ps;
@@
let isdoc c ps =
List.length ps > 1 &&
(let c = String.trim c in
String.length c > 3 && String.sub c 0 3 = "/**" && String.get c 3 != '*') in
let subset l1 l2 =
List.for_all (fun x -> List.mem x l2) l1 in
let (cb,cm,ca) = List.hd c in
match List.rev cb with
c::_ when isdoc c ps ->
let pieces = String.split_on_char '@' c in
(match pieces with
_::tl ->
let d_names = List.map parse_doc tl in
(* check parameters *)
let p_names = List.map fst (params ps) in
if d_names <> [] && not(d_names = p_names)
then
begin
if List.sort compare d_names = List.sort compare p_names
then Coccilib.print_main "out of order" p
else if subset d_names p_names
then Coccilib.print_main "doc is missing a parameter" p
else if subset d_names p_names
then Coccilib.print_main "doc has an extra parameter" p
end
| _ -> ())
| _ -> ()
// </smpl>
---
arch/arm/mach-omap2/prm2xxx_3xxx.c | 1 -
arch/powerpc/platforms/ps3/interrupt.c | 2 +-
arch/powerpc/platforms/ps3/repository.c | 2 +-
drivers/base/firmware_loader/main.c | 2 +-
drivers/comedi/drivers/comedi_8254.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
drivers/gpu/drm/drm_gem_framebuffer_helper.c | 3 +--
drivers/gpu/drm/drm_gpuvm.c | 2 +-
drivers/gpu/drm/radeon/radeon_ib.c | 2 +-
drivers/iommu/iommu.c | 2 +-
drivers/leds/leds-gpio-register.c | 2 +-
drivers/mfd/atmel-smc.c | 4 ++--
drivers/misc/mei/bus.c | 2 +-
drivers/mtd/ubi/eba.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c | 2 +-
drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +++----
drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +-
drivers/nvdimm/dimm_devs.c | 2 +-
drivers/pci/hotplug/pci_hotplug_core.c | 2 +-
drivers/pinctrl/pinmux.c | 2 +-
drivers/slimbus/messaging.c | 2 +-
drivers/soc/qcom/qmi_interface.c | 2 +-
drivers/soundwire/stream.c | 2 +-
drivers/usb/gadget/config.c | 4 ++--
fs/char_dev.c | 2 +-
fs/dcache.c | 4 ++--
fs/seq_file.c | 2 +-
kernel/audit.c | 2 +-
kernel/resource.c | 2 +-
kernel/sysctl.c | 1 -
kernel/trace/ring_buffer.c | 2 +-
lib/lru_cache.c | 2 +-
lib/maple_tree.c | 2 +-
mm/mmu_notifier.c | 2 +-
net/dccp/feat.c | 2 +-
net/mac80211/mesh_hwmp.c | 6 +++---
net/mac80211/mesh_pathtbl.c | 10 +++++-----
net/socket.c | 2 +-
net/sunrpc/xprt.c | 2 +-
net/tipc/link.c | 14 +++++++-------
net/tipc/msg.c | 2 +-
sound/pci/hda/hda_codec.c | 2 +-
45 files changed, 60 insertions(+), 64 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH 33/35] drivers/net/ethernet/intel: Reorganize kerneldoc parameter names
2024-09-30 11:20 [Intel-wired-lan] [PATCH 00/35] Reorganize kerneldoc parameter names Julia Lawall
@ 2024-09-30 11:21 ` Julia Lawall
2024-09-30 21:14 ` Tony Nguyen
2024-10-06 1:55 ` [Intel-wired-lan] (subset) [PATCH 00/35] " Bjorn Andersson
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2024-09-30 11:21 UTC (permalink / raw)
To: Tony Nguyen
Cc: Przemek Kitszel, kernel-janitors, linux-kernel, Eric Dumazet,
intel-wired-lan, netdev, Jakub Kicinski, Paolo Abeni,
David S. Miller
Reorganize kerneldoc parameter names to match the parameter
order in the function header.
Problems identified using Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +++----
drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +-
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index f9328f2e669f..1b7e78018b8f 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -3839,8 +3839,8 @@ static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw)
* e1000_read_eeprom - Reads a 16 bit word from the EEPROM.
* @hw: Struct containing variables accessed by shared code
* @offset: offset of word in the EEPROM to read
- * @data: word read from the EEPROM
* @words: number of words to read
+ * @data: word read from the EEPROM
*/
s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
{
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index e8031f1a9b4f..f2d342ffc6d6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1045,9 +1045,9 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
/**
* i40e_aq_get_phy_capabilities
* @hw: pointer to the hw struct
- * @abilities: structure for PHY capabilities to be filled
* @qualified_modules: report Qualified Modules
* @report_init: report init capabilities (active are default)
+ * @abilities: structure for PHY capabilities to be filled
* @cmd_details: pointer to command details structure or NULL
*
* Returns the various PHY abilities supported on the Port.
@@ -1948,7 +1948,6 @@ int i40e_aq_get_switch_config(struct i40e_hw *hw,
* i40e_aq_set_switch_config
* @hw: pointer to the hardware structure
* @flags: bit flag values to set
- * @mode: cloud filter mode
* @valid_flags: which bit flags to set
* @mode: cloud filter mode
* @cmd_details: pointer to command details structure or NULL
@@ -2534,9 +2533,9 @@ int i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid,
* @hw: pointer to the hw struct
* @sw_seid: Switch SEID (to which rule refers)
* @rule_type: Rule Type (ingress/egress/VLAN)
- * @count: length of the list
* @rule_id: Rule ID that is returned in the receive desc as part of
* add_mirrorrule.
+ * @count: length of the list
* @mr_list: list of mirrored VLAN IDs to be removed
* @cmd_details: pointer to command details structure or NULL
* @rules_used: Number of rules used in internal switch
@@ -3444,8 +3443,8 @@ int i40e_aq_start_lldp(struct i40e_hw *hw, bool persist,
/**
* i40e_aq_set_dcb_parameters
* @hw: pointer to the hw struct
- * @cmd_details: pointer to command details structure or NULL
* @dcb_enable: True if DCB configuration needs to be applied
+ * @cmd_details: pointer to command details structure or NULL
*
**/
int
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 009716a12a26..8a61e13eca1d 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -5301,8 +5301,8 @@ ice_aq_get_output_pin_cfg(struct ice_hw *hw, u8 output_idx, u8 *flags,
* @hw: pointer to the HW struct
* @dpll_num: DPLL index
* @ref_state: Reference clock state
- * @config: current DPLL config
* @dpll_state: current DPLL state
+ * @config: current DPLL config
* @phase_offset: Phase offset in ns
* @eec_mode: EEC_mode
*
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 3be1bfb16498..f6559b1d1433 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -2635,9 +2635,9 @@ void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u32 mask)
/**
* prot_autoc_read_generic - Hides MAC differences needed for AUTOC read
* @hw: pointer to hardware structure
- * @reg_val: Value we read from AUTOC
* @locked: bool to indicate whether the SW/FW lock should be taken. Never
* true in this the generic case.
+ * @reg_val: Value we read from AUTOC
*
* The default case requires no protection so just to the register read.
**/
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH 33/35] drivers/net/ethernet/intel: Reorganize kerneldoc parameter names
2024-09-30 11:21 ` [Intel-wired-lan] [PATCH 33/35] drivers/net/ethernet/intel: " Julia Lawall
@ 2024-09-30 21:14 ` Tony Nguyen
0 siblings, 0 replies; 6+ messages in thread
From: Tony Nguyen @ 2024-09-30 21:14 UTC (permalink / raw)
To: Julia Lawall
Cc: Przemek Kitszel, kernel-janitors, linux-kernel, Eric Dumazet,
intel-wired-lan, netdev, Jakub Kicinski, Paolo Abeni,
David S. Miller
On 9/30/2024 4:21 AM, Julia Lawall wrote:
> Reorganize kerneldoc parameter names to match the parameter
> order in the function header.
>
> Problems identified using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
>
> ---
> drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +-
> drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +++----
> drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
> drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +-
> 4 files changed, 6 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] (subset) [PATCH 00/35] Reorganize kerneldoc parameter names
2024-09-30 11:20 [Intel-wired-lan] [PATCH 00/35] Reorganize kerneldoc parameter names Julia Lawall
2024-09-30 11:21 ` [Intel-wired-lan] [PATCH 33/35] drivers/net/ethernet/intel: " Julia Lawall
@ 2024-10-06 1:55 ` Bjorn Andersson
2024-11-17 12:09 ` Michael Ellerman
2024-12-20 17:27 ` Srinivas Kandagatla
3 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2024-10-06 1:55 UTC (permalink / raw)
To: linux-gpio, Julia Lawall
Cc: nvdimm, alsa-devel, Jan Kara, Rafael J. Wysocki, Neil Brown,
linux-pci, kernel-janitors, dri-devel, linux-mm, linux-mtd,
amd-gfx, linux-leds, drbd-dev, Pierre-Louis Bossart, dccp,
Dai Ngo, Christophe Leroy, iommu, intel-wired-lan, Robin Murphy,
Olga Kornievskaia, linux-arm-msm, Naveen N Rao, linux-sound,
maple-tree, Tom Talpey, Madhavan Srinivasan, Mathieu Desnoyers,
Nicholas Piggin, linux-omap, Zhihao Cheng, linux-arm-kernel,
linux-nfs, netdev, linux-usb, linux-wireless, linux-kernel, audit,
tipc-discussion, linux-fsdevel, Sanyog Kale, linux-trace-kernel,
linuxppc-dev
On Mon, 30 Sep 2024 13:20:46 +0200, Julia Lawall wrote:
> Reorganize kerneldoc parameter names to match the parameter
> order in the function header.
>
> The misordered cases were identified using the following
> Coccinelle semantic patch:
>
> // <smpl>
> @initialize:ocaml@
> @@
>
> [...]
Applied, thanks!
[24/35] soc: qcom: qmi: Reorganize kerneldoc parameter names
commit: eea73fa08e69fec9cdc915592022bec6a9ac8ad7
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] (subset) [PATCH 00/35] Reorganize kerneldoc parameter names
2024-09-30 11:20 [Intel-wired-lan] [PATCH 00/35] Reorganize kerneldoc parameter names Julia Lawall
2024-09-30 11:21 ` [Intel-wired-lan] [PATCH 33/35] drivers/net/ethernet/intel: " Julia Lawall
2024-10-06 1:55 ` [Intel-wired-lan] (subset) [PATCH 00/35] " Bjorn Andersson
@ 2024-11-17 12:09 ` Michael Ellerman
2024-12-20 17:27 ` Srinivas Kandagatla
3 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2024-11-17 12:09 UTC (permalink / raw)
To: linux-gpio, Julia Lawall
Cc: kernel-janitors, audit, linux-mtd, Zhihao Cheng,
Rafael J. Wysocki, linux-arm-msm, linux-pci, dri-devel, linux-usb,
linux-mm, maple-tree, alsa-devel, Sanyog Kale,
Pierre-Louis Bossart, dccp, linux-fsdevel, Jan Kara, drbd-dev,
linux-sound, linux-kernel, linux-omap, linux-arm-kernel, netdev,
nvdimm, linux-leds, Nicholas Piggin, Christophe Leroy,
Naveen N Rao, Madhavan Srinivasan, linuxppc-dev, tipc-discussion,
Robin Murphy, iommu, Mathieu Desnoyers, linux-trace-kernel,
Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey, linux-nfs,
amd-gfx, linux-wireless, intel-wired-lan
On Mon, 30 Sep 2024 13:20:46 +0200, Julia Lawall wrote:
> Reorganize kerneldoc parameter names to match the parameter
> order in the function header.
>
> The misordered cases were identified using the following
> Coccinelle semantic patch:
>
> // <smpl>
> @initialize:ocaml@
> @@
>
> [...]
Applied to powerpc/next.
[11/35] powerpc/ps3: Reorganize kerneldoc parameter names
https://git.kernel.org/powerpc/c/276e036e5844116e563fa90f676c625bb742cc57
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] (subset) [PATCH 00/35] Reorganize kerneldoc parameter names
2024-09-30 11:20 [Intel-wired-lan] [PATCH 00/35] Reorganize kerneldoc parameter names Julia Lawall
` (2 preceding siblings ...)
2024-11-17 12:09 ` Michael Ellerman
@ 2024-12-20 17:27 ` Srinivas Kandagatla
3 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2024-12-20 17:27 UTC (permalink / raw)
To: linux-gpio, Julia Lawall
Cc: kernel-janitors, audit, linux-mtd, Zhihao Cheng,
Rafael J. Wysocki, linux-arm-msm, linux-pci, dri-devel, linux-usb,
linux-mm, maple-tree, alsa-devel, Sanyog Kale,
Pierre-Louis Bossart, dccp, linux-fsdevel, Jan Kara, drbd-dev,
linux-sound, linux-kernel, linux-omap, linux-arm-kernel, netdev,
nvdimm, linux-leds, Nicholas Piggin, Christophe Leroy,
Naveen N Rao, Madhavan Srinivasan, linuxppc-dev, tipc-discussion,
Robin Murphy, iommu, Mathieu Desnoyers, linux-trace-kernel,
Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey, linux-nfs,
amd-gfx, linux-wireless, intel-wired-lan
On Mon, 30 Sep 2024 13:20:46 +0200, Julia Lawall wrote:
> Reorganize kerneldoc parameter names to match the parameter
> order in the function header.
>
> The misordered cases were identified using the following
> Coccinelle semantic patch:
>
> // <smpl>
> @initialize:ocaml@
> @@
>
> [...]
Applied, thanks!
[31/35] slimbus: messaging: Reorganize kerneldoc parameter names
commit: 52d3d7f7a77ee9afc6a846b415790e13e1434847
Best regards,
--
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-23 16:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 11:20 [Intel-wired-lan] [PATCH 00/35] Reorganize kerneldoc parameter names Julia Lawall
2024-09-30 11:21 ` [Intel-wired-lan] [PATCH 33/35] drivers/net/ethernet/intel: " Julia Lawall
2024-09-30 21:14 ` Tony Nguyen
2024-10-06 1:55 ` [Intel-wired-lan] (subset) [PATCH 00/35] " Bjorn Andersson
2024-11-17 12:09 ` Michael Ellerman
2024-12-20 17:27 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox