Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp331649rdb; Tue, 5 Dec 2023 06:46:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2EqcNaad2MZNVTorKKE/qvedjLhlGD0oDjH+ROqLXqE7AxenHppo69E+ds8G0BGKTBZMA X-Received: by 2002:a2e:240b:0:b0:2ca:29d:42f5 with SMTP id k11-20020a2e240b000000b002ca029d42f5mr1619169ljk.93.1701787560670; Tue, 05 Dec 2023 06:46:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701787560; cv=none; d=google.com; s=arc-20160816; b=SuqaXIpVEooRiVGvCB9quO3p2yVchaSwhCs2Ugs7O5nexIOd9U0QbvK76jcDKkVyj7 eKXiHTLqCVNuXsa/Bicp/+4hBGZ7Jme1grSIEpbqHiLrLPqr0yL6byAxKgYAE8jlex10 znsPGelY1RJ9h24Xxu5Cfd7towBlA2Zd3KkAX2ZvSYEo0uOG5d3sbT/xht3QtXOkXQHG tME0x5K1t5kRQQUCjweZGqDqZj2uM7QHc2Yra2HaapbuymbBsMQcxyADnmpiwQB7G7zf PK8xGA6fMLE14MkOM1dNHqZqnky9FiUaXydRc34SmVENCzQufH/ZPNMFTKS45upBuOsa 5TZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=mwH7MX1ZKm9Qp0cnW8QyOO/xM/c5huW17VFpXanrmWM=; fh=eiHrg2z+m9kyNM11eBmW1whxmNggloFAgdJ3yvXmXUI=; b=O04+u6wsYRQrKqb9S47fa2HF41V8vpSLZXTSv+BwhZdJet09evdk9bcMQD0h97rg/P hESXATc0f0H1dF6SMKhRvjEYCu0iRcsgF/LAl+ETLmk5IMh88AqvNyN1Ymmw/Ou6cK1+ /AA+noxlvH9L4Pp6nL3Fq6FM1fPHObPan9IFL2tj/7IULcfihyuBfSa81oirxqNAkzPe Sq/K4Ek8WEu/uqH+8IFn9Fw4sawKvZy6ClpeBVMkzkJXhJTFt3kSinyf9fokd7DgDZMk mWX1tzvLneAm0YlpjQlfTOeSfc1jIsLDsxidn6s/olqhDUBP/O4od/FWgRivaChtdv9k mO6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JJWROqHH; spf=pass (google.com: domain of linux-wireless+bounces-424-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-424-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bw13-20020a170906c1cd00b00a1c68c96a28si604478ejb.878.2023.12.05.06.46.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:46:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-424-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JJWROqHH; spf=pass (google.com: domain of linux-wireless+bounces-424-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-424-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E58781F2165F for ; Tue, 5 Dec 2023 14:45:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C5775B5C5; Tue, 5 Dec 2023 14:45:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JJWROqHH" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4FC539FE9 for ; Tue, 5 Dec 2023 14:45:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36C69C433C7; Tue, 5 Dec 2023 14:45:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701787555; bh=cErcNxuSq+KwDwGNIQMoU3Oz6YM+Ijm70S9VqePDyoo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JJWROqHH/czRco/daAN5+vEzbMTMOOFShTNzRfXpPc5yqzEvuNpmfOM63EGkcXSiY LO1i0RnJehM6di/b+Yk0SmAAuHbkHUbzj5KXGUkQCrVwgaZh7oypLmP9K6OyRS4DXV 1MyzjaZSbhXaO9yJOR2N10xFWi+8jABl2TsJ9VRLL8GrqyjWJVvhXcdmx69RL+shm2 SPYZJ/sFremswXB4JMPY+xpHP3Vr3dvSCk9bNxb5V1sEVHLIqh9kasEw3gV94U/pqL hqQ07L4U5jF7ZgA19LANGGSvoOxFBb5BiJOwjBmTeIa8Cy4dHIgynHIlcZ+FZYICjB bkB2RDlJoLQKA== From: Kalle Valo To: Jiri Slaby Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Felix Fietkau , Nick Kossifidis , Luis Chamberlain Subject: Re: [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna References: <20231205111515.21470-1-jirislaby@kernel.org> <874jgwrgxu.fsf@kernel.org> Date: Tue, 05 Dec 2023 16:45:51 +0200 In-Reply-To: (Jiri Slaby's message of "Tue, 5 Dec 2023 14:10:11 +0100") Message-ID: <87msuopv1c.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jiri Slaby writes: > On 05. 12. 23, 13:07, Kalle Valo wrote: >> "Jiri Slaby (SUSE)" writes: >> >>> clang-struct [1] found that ee_antenna in struct ath5k_eeprom_info is >>> unused. The commit 1048643ea94d ("ath5k: Clean up eeprom >>> parsing and add missing calibration data") added it, but did not use it >>> in any way. Neither, there is a later user. >>> >>> So remove that unused member. >>> >>> [1] https://github.com/jirislaby/clang-struct >> >> clang-struct looks really nice, especially if it can also find unused >> structures. > > It can... Nice! >> What about unused defines or enums, any chance to find those >> in the future? :) > > All of that is IMO possible (I'm not completely sure about macros, > despite clang ASTs provide a lot of info. Incl. info about them and > their expansion). Too bad, I wish that there would be a tool for that. I suspect wireless drivers have unused defines and enums, it would be nice to clean up that. > It's all limited only by man-force: me. Yeah, I guessed that. Thanks for making this tool available, hopefully more people start using it. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches