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: 13815886 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 068FDCF6497 for ; Mon, 30 Sep 2024 11:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=9JFHu5GN4m1ZIa7hFOr/S0cR7gAkAibwxtDh3yT9bKQ=; b=jcNdw4qIDgO9JLTRdmIBGUQsAI FNiKmqE/+w3Rxbc4ba1w+7oX+TupEOT5rwbfnVurEElWYitCg/ADA3pBXGHmB7h6Mpxn6OjMxLppG eEu3LbSerYP0Q86ickndOiiQRI8MhbGsbYLZKIytr1KFfM1Aw2gWVwve+t9pJH3Kreg1C0/68f72L BmhEUhTl+KxruC37tNkj9bUuMx1yauGDnK++z/ypE7QgFcUu50yQSEd/rc01F1H//jWJEHPUTALfl 7hA4OCTZGkCyDgXodQVYYK9bfVJex9Q0y7gRxbDCe/xPYQrTe7ZYisIoPdxhFJdCOIYpl613A1PMB dMK6Qifw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svEVd-0000000GqPU-2JPo; Mon, 30 Sep 2024 11:24:09 +0000 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svETB-0000000Gpbs-0JRK; Mon, 30 Sep 2024 11:21:38 +0000 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=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=Julia.Lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_042137_411128_CC1A4BAE X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(-)