From patchwork Mon Sep 30 11:20:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 13815856 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4DAECF6497 for ; Mon, 30 Sep 2024 11:21:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3482580027; Mon, 30 Sep 2024 07:21:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D14880017; Mon, 30 Sep 2024 07:21:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14BA680027; Mon, 30 Sep 2024 07:21:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E7E6280017 for ; Mon, 30 Sep 2024 07:21:30 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8CAF6C0196 for ; Mon, 30 Sep 2024 11:21:30 +0000 (UTC) X-FDA: 82621163940.04.FB0ED85 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by imf07.hostedemail.com (Postfix) with ESMTP id 4C3D94000A for ; Mon, 30 Sep 2024 11:21:28 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=inria.fr header.s=dc header.b=N5Crvn6K; spf=pass (imf07.hostedemail.com: domain of Julia.Lawall@inria.fr designates 192.134.164.83 as permitted sender) smtp.mailfrom=Julia.Lawall@inria.fr; dmarc=pass (policy=none) header.from=inria.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727695162; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=9JFHu5GN4m1ZIa7hFOr/S0cR7gAkAibwxtDh3yT9bKQ=; b=2+RE396kV+hHzh0N/kN/FV0Qx2yLch/7RTLXaDagr1RoERn6cXcjdb1AD3sag6568WkC87 2i16ZSN6uZSTdgoSNLhUKKZ6zufQklBfepiW7DW4BAKLJ97Di5wi5id+TNr6+c/XBHK3Mz HlgSxVYTaBsBlajEjV39oFmDSXYhCDY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727695162; a=rsa-sha256; cv=none; b=M44s1F7+cH0RLGt3XQZ8e7BPvGGYYpUeOdzkIMrWyoDg4BuPb8Dysm2KzxyeRPFIMwAlgb rjQR59At3h8DOZt2EZOtzG96r9afUMqdra7aNowbLZ9aENq+2sUjJDlvChAgZYubKZAj7x jFfX0QMmycPw7mSKL+zoMs9CldmoHgA= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=inria.fr header.s=dc header.b=N5Crvn6K; spf=pass (imf07.hostedemail.com: domain of Julia.Lawall@inria.fr designates 192.134.164.83 as permitted sender) smtp.mailfrom=Julia.Lawall@inria.fr; dmarc=pass (policy=none) header.from=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9JFHu5GN4m1ZIa7hFOr/S0cR7gAkAibwxtDh3yT9bKQ=; b=N5Crvn6Kq6KpHSPNN73aCiDy+RvsqlM0pHtSseTwUaXi/R+AUcNhRU/s cjlHPMFgIZOJllRTItDSSyRCzG1SoWucsK69kp3cC+hyWG6w77VR7U5lk 50vSZgwZFWWTGfQ7neSTgSg1frKowyQAjCduh7p7sY9rw2OBXSFMSw4B2 4=; X-IronPort-AV: E=Sophos;i="6.11,165,1725314400"; d="scan'208";a="185956867" Received: from i80.paris.inria.fr (HELO i80.paris.inria.fr.) ([128.93.90.48]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2024 13:21:25 +0200 From: Julia Lawall To: linux-gpio@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, audit@vger.kernel.org, linux-mtd@lists.infradead.org, Zhihao Cheng , "Rafael J. Wysocki" , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-usb@vger.kernel.org, linux-mm@kvack.org, maple-tree@lists.infradead.org, alsa-devel@alsa-project.org, Sanyog Kale , Pierre-Louis Bossart , dccp@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jan Kara , drbd-dev@lists.linbit.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, nvdimm@lists.linux.dev, linux-leds@vger.kernel.org, Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan , linuxppc-dev@lists.ozlabs.org, tipc-discussion@lists.sourceforge.net, Robin Murphy , iommu@lists.linux.dev, Mathieu Desnoyers , linux-trace-kernel@vger.kernel.org, Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , linux-nfs@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-wireless@vger.kernel.org, intel-wired-lan@lists.osuosl.org Subject: [PATCH 00/35] Reorganize kerneldoc parameter names Date: Mon, 30 Sep 2024 13:20:46 +0200 Message-Id: <20240930112121.95324-1-Julia.Lawall@inria.fr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Stat-Signature: do8t1msbcuoadjkuobhner9kmscjjiuk X-Rspamd-Queue-Id: 4C3D94000A X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1727695288-800446 X-HE-Meta: U2FsdGVkX1+EqGf1qrjd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RVqACnYTm0uO8/h48/T9Dw9ZzA38DhBP3/mATfB99Nrj0YqDgXVviQJVwNfY0CIZ4MdhqKg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Reorganize kerneldoc parameter names to match the parameter order in the function header. The misordered cases were identified using the following Coccinelle semantic patch: // @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 | _ -> ()) | _ -> () // --- 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(-)