Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp7099lfv; Tue, 12 Apr 2022 15:03:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9sRkNPHV+8dWkpEWPkRQImU2Q8NOunXOLD/IDIn9VCEUKbV8u+7fjP00TSHxzzmhSI3k7 X-Received: by 2002:a63:5115:0:b0:39c:d48d:1b87 with SMTP id f21-20020a635115000000b0039cd48d1b87mr22982705pgb.107.1649800998920; Tue, 12 Apr 2022 15:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649800998; cv=none; d=google.com; s=arc-20160816; b=d6gbfkQ/wISO9+hAxC/WW8/Ptj1o7SzSqcj+IsWid6OAgmy1m6tEoCfyxM0hp+tNpU F7X4l8it+YVCOHJwS60K12BfCs7UbVzXtNsK0aCvDLHsXu5O2ho4pvea3UTBv+fgPWnw sWgKPhPZk8aAx8EjLM7rI0DMa2L8VfkVzrAK12k4djLopBNghKGqRfOUA+LdIDAuPUz2 4pddatLpresToGXPOSAHsofSblxkrD1EHOizJIZigWvsNnek1bOrqYmASXEcMfblpGYu D/B8LY8BZbSUCgNY92CokGDwolUNevj8II9LbbfwrkBbAymybXu6mC8Xy2VJ1KrbRegb 06sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hQSCfnaBsU/Ke9sQUqDKQjNvTqcreUUjTnRubL+uKo8=; b=0CgHE44paf7MUYY643kKEVrRrYNe44gtb0hBi/s0iEbgD90Nd3me5EbsdEVrcbPjOQ YnSsyEFqrVuxmP8rfEOFOnG271+KB5cf8laUZ9+XE0oUdEb/n8lkHX8lSEVpQs7uy/HJ FeWZuv6DN/MMYaqCwPBdQ2pL+x9FI4YgjiL7qumT62zoT//Wgp59mwc4ovxirVdR24zM VwRdETBFOCl5O0zJsJ72pSwlymYKgTA3TNJIpcCSe7Z8GDuZ8mjDyCAfUBKMYdNFqRLz dOLUGHjAiE4XVtYj9emM9738P7GrLPX1FjR5iRQEm+2OnHu7XVpk54YZOmRlj6NyGqiH Wrxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t8qxtKRa; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t13-20020a6549cd000000b0039cc76db5easi3940685pgs.530.2022.04.12.15.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:03:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t8qxtKRa; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF32315EDE5; Tue, 12 Apr 2022 13:55:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354749AbiDLM6z (ORCPT + 99 others); Tue, 12 Apr 2022 08:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354806AbiDLM4b (ORCPT ); Tue, 12 Apr 2022 08:56:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F4004969B for ; Tue, 12 Apr 2022 05:30:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6ECA46152A for ; Tue, 12 Apr 2022 12:30:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2091C385A9; Tue, 12 Apr 2022 12:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649766617; bh=y09qGgSfZHH++MJGmH/EkBz5py9CFxNAIo8FN2xFVTY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t8qxtKRam3NtVJa3mj2VLoOZln/oJEwuSDOuIRLMBjEyJ3+Pja0DvUEAqD7f3LOee CnvtfKJ0kuMz5K5nYcQ1j57SHs2dEB2kWn9UF+0LNWXU4jITmd2yAY+dSWkissgpK5 zpUa0CbLNrOzS+EciE6Ci7w39GDBJgoiZiVWcxjigrLE2utZ3Ckw+rgeNIkYJKLuxn IchBbLVrj4+p4ME30RX0zlo/zJADcKJ8OMsflr/KrsFmbqX7Vigqk89EAL+rI6cq6b 4qtdAa/PNCmq46RnCWhe7/YzglHoh//3OID4GgPzZtSrEE7pybu7pjGoWuxFHhkxHn XcdzyVt0IM8mw== Date: Tue, 12 Apr 2022 13:30:10 +0100 From: Mark Brown To: Andy Shevchenko Cc: Rasmus Villemoes , Greg Kroah-Hartman , "Rafael J. Wysocki" , Linux Kernel Mailing List Subject: Re: [PATCH] regmap: make range check functions static Message-ID: References: <20220328225628.3012397-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="shtyL6OGlWw7Wn2n" Content-Disposition: inline In-Reply-To: X-Cookie: Approved for veterans. X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --shtyL6OGlWw7Wn2n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 11, 2022 at 05:59:33PM +0300, Andy Shevchenko wrote: > On Wed, Mar 30, 2022 at 11:17 PM Mark Brown wrote: > > On Tue, Mar 29, 2022 at 12:56:28AM +0200, Rasmus Villemoes wrote: > > > regmap_reg_in_ranges() and regmap_check_range_table() have no callers > > > outside regmap.c, so they have no reason to be exported nor have > > > external linkage. > > These are intentional API in case someone needs them, no need to > > encourage open coding. > But currently it's not used and simply consumes namespace resources. > Isn't it our practice not to add dead code / etc? > In practice I assume that one will grep before implementing, or at > least at review stage it may be pointed out for a helper, that might > be exported when needed, no? Or they'll just look at it and think there must be some good reason they're missing, or that having to deal with cross tree issues is too much pain and just open code stuff. It's not insurmountable but there is a clarity and usability benefit here. --shtyL6OGlWw7Wn2n Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmJVcNEACgkQJNaLcl1U h9BvmQf/YvnphxulfbspZ25ZWsO9BPIjLvEKL4QZ9QIFHO1FJADQ+FeXJPs46Awt 7rRCNwsehqnIEItQ6m5r5dK6O4tcLF6fiPD76QRuxh4ylULP+WMnUInLOWJmDWLn ibfrbTIpRH6mowpkByDhjrZ/cMH+Z3NQMdJkSJ7sDujql7I89wXXMU2ctoMLrLB+ 05c0JbZFsYbUOLTIYXokuKuWEBfnubNMZVTIMZ/8mx31LGLBbthhw8itD4rtGOuH Bfg/PpMwfJ4DvkrIaQSN74Yw2W2A9WZqHmhQ2nI0teZsaLhOjyfbPefgUz/eya/Q t3sMlkoDQkP0N+yXpFYtN6xkZo4F+g== =Ve6R -----END PGP SIGNATURE----- --shtyL6OGlWw7Wn2n--