Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5758301ioo; Wed, 1 Jun 2022 11:58:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgCOp6Zg6EcRGWwaNlDfvbsTqmqKOaEOTakriREk2Q3wp1b58cW9M2z3szJYcMTtytboRM X-Received: by 2002:a17:903:2cb:b0:14f:4fb6:2fb0 with SMTP id s11-20020a17090302cb00b0014f4fb62fb0mr839411plk.172.1654109909626; Wed, 01 Jun 2022 11:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654109909; cv=none; d=google.com; s=arc-20160816; b=E9KaAAKpkQQ8Stx4PwMz4+8T2KjOyb6mThriN1UbklLOQbv9okqfPzA7tAKSTe/eMo XqENGLBv5c+LqlArZRsjM+O8O+0KAQ9tVQ7QKHq/7LT85rcdsPeOjtsNCiXVaQAKQpIc Dn7etfpW8BV+gvHt3xMNNCQDZlMd1mNNaxPkn5pMExg+aTyDZeZYadZ7DLUD62PFpjm4 UVXOIQr42/fLo4NO9+knIikJjcXqwP+i56/NFdY3U4x0jh8Bm/ejfW34JbfkAp/xq7hS RDehbvbv/wRZhxWEn2hugG07CqB8i5Ar1+30shN7MW/sTjUfHM/1DfF5q9aNdGBYwuqw JALg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=I6bQ8wNEdYW/5SL8f6wJxD6xOkrcMizWwzbAsv5iCvA=; b=dYglJ9E43gwX8vQm9YIRu5+7/PSzBx9yl5crdGHc4m7dA4sovnVSG4GLlm10QtmXW6 vdcAAccOvznuMI6Cdy3mNpGDwDhSaWpUaoo0mTYZjnF8uRXMx7feOrDMC6qkHJLTIxFn dcuZG2fMuX1kncguYS3D8WKjKuXpoOSH/WARv/G7MohUCpoEV2R28l5Y1SK86o5P+Q5X JpvEDiFuv5luVTvKy4NpzNSRV1IQLBSbjKi5RBogMZfSi0+FcjKGIp/5ZSbH/zVnuz0v 9Zs+L8ujce3/wwhDiXu9NBZMJVEGNwy6SRphKwR0x+s4ToC/Rjl1MGnpjNvyZD8iSuU+ KiNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YLyg9lZx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 71-20020a63014a000000b003f66d07b6e1si3369225pgb.721.2022.06.01.11.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 11:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YLyg9lZx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4DE3EC8BF0; Wed, 1 Jun 2022 11:45:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349136AbiFAKCz (ORCPT + 99 others); Wed, 1 Jun 2022 06:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351641AbiFAKBy (ORCPT ); Wed, 1 Jun 2022 06:01:54 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAEE063FE; Wed, 1 Jun 2022 03:01:48 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id er5so1416337edb.12; Wed, 01 Jun 2022 03:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I6bQ8wNEdYW/5SL8f6wJxD6xOkrcMizWwzbAsv5iCvA=; b=YLyg9lZx7RpmWmTo5cyuxwreuST/cxTejpPxUTQ0GZK8lNMLhKXVwtpxIoFJ/Fn/pe v7gt3idwTDdocYUqobMDS6ukD1d7rbZcT0UPm7jvCALN5AgtwusZW37N1K+O+Sr2hxMY YFT+R8i354F7CBA6yx2Li7mltB0MZ73rjEij4bXALPZoX6Ztyhw49VOZbHB+X//d4tTX wlALNt75BktCff/LSLb9aemUjjyUtYD73s2Csy1RzjRPMP3Kn0Tjv8bz2QdEIDlhJuum 81+2A80qcAKk56kT22tswnGY49wnu7mxzePzw2Co83YtV8tCgoTzMh4wD5kO6VcVy7yk eugQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I6bQ8wNEdYW/5SL8f6wJxD6xOkrcMizWwzbAsv5iCvA=; b=UXngoaWfGDfkr/S45rRj5t/cSnUzWK+mNsOGDJ5IhzGe0SrRwYgvYUJpVc8A1jxoul 7idauabBpuJ0Bc1oRMVPRkzpRoEycxaXIIjgVyY2YKQJsyOHAPPUbD/mZLRvqdmgm79M zE5K0BpFadm0AyDhDyzXurU6KSZGldB5EStA/VbiuAG3QLd1lWZKJ10h+Id3aBJb7FOR 4wFpgLdOts1l4pLumBVYYrfT+0CvbSl0NVsDiyrq0KFUsTg/p0fNDEsxNXloR70K7MEy 8OnfZ7KkG3bge5krUvEA0GtkpKH8/gJdKCKQSWDGs2wfgxBwAXynCWKg0quwwAkDktcJ j2wg== X-Gm-Message-State: AOAM5312aZZykq1C5XQaZ+661xtURsXO/dvDify1cnX4x1pxN1/FNpjV byT0V7SJejNqv9jpv8TiNz61x8D6VcD7S2GbYkU= X-Received: by 2002:aa7:c396:0:b0:42d:8b86:a8dc with SMTP id k22-20020aa7c396000000b0042d8b86a8dcmr5401417edq.54.1654077708412; Wed, 01 Jun 2022 03:01:48 -0700 (PDT) MIME-Version: 1.0 References: <20220531181016.76007-1-joetalbott@gmail.com> In-Reply-To: <20220531181016.76007-1-joetalbott@gmail.com> From: Andy Shevchenko Date: Wed, 1 Jun 2022 12:01:12 +0200 Message-ID: Subject: Re: [PATCH v2] iio: Use octal permissions and DEVICE_ATTR_{RO,RW}. To: Joe Simmons-Talbott Cc: Jonathan Cameron , linux-iio , Linux Kernel Mailing List , Joe Perches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Tue, May 31, 2022 at 9:40 PM Joe Simmons-Talbott wrote: > > As reported by checkpatch.pl. Where possible use DEVICE_ATTR_RO and DEVICE_ATTR_RO() > DEVICE_ATTR_RW. Change function names to be _show() for read and DEVICE_ATTR_RW() > _store() for write. ... > static struct device_attribute dev_attr_length_ro = __ATTR(length, > + 0444, length_show, NULL); > static struct device_attribute dev_attr_watermark_ro = __ATTR(watermark, > + 0444, watermark_show, NULL); Why not __ATTR_RO() here? -- With Best Regards, Andy Shevchenko