Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2161089pxb; Fri, 25 Mar 2022 12:10:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUpib1tI94wJDgIBVzgZ3jlFHDFYNzLoZNAEp2LKH/K8xZXS2IdFqX9sVCfePRywe7nQmE X-Received: by 2002:a05:6a00:1516:b0:4f7:d45:3769 with SMTP id q22-20020a056a00151600b004f70d453769mr11492225pfu.86.1648235435154; Fri, 25 Mar 2022 12:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648235435; cv=none; d=google.com; s=arc-20160816; b=AykEmqG11jpxPDst60gpQ6WH1XkfYjAElMI7MpsGlaR7xUGK1oXxBzNSShdp4+++rs GgC7tR6rxuXym+8VEWvy3pauTwKVP0F/TLPk8TERNTxKpw4G+5eT+/yHznFhkNQV6d8c jEzQW6Yz8GrKG3TwfnZJnjsngQE1rCeZuhiQlHPiqfEF1n/pjg/sU15ehrpJ+nVn6p2u 2f9C30N4McTm3z4vsCrxInWoIYRb1HmMTBf/2xdIGS2f379qgak1+RDkVlUOKCu0J/8Q peV00efVQRuBH7lneF8p8axsE0zXzD+ZzHzYEvTV4vXh3ZxyV9fQavPgFrjz18IQn5JQ IYWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=lT/mkTlF1KvvwSoDM5qHiKLebWKIhL6UkQXFheTUFxc=; b=yjzpvEIzW61ymlegXPcRU3VKSTS9S6vDTf3X3m5kEme2F9FwCMmFDRPYlXfGRG3Qok SYwexiAhDOR6iXXWKTH9LIYYuQnVivzplcB5ZWISW9VwYPyjSu4+uQalZ450qHWfKL9l f8p9l9uBV7TIntDtAOAJuYSHEfqPuTiOOB+XXkBIDGtbLN0WHmWXkNzrf7y+mOwfbu3D lMw58waQkPInLfdfEtQnDuxMH4aNm6QaR/IZs2yTUHZKx0adIJKrYUi4byuj/YxgpZVo N9OJ7jmTv0/ZsR7SEWYm7coRd8yQRS1rHGy5IRXHny8ElaMGgwrvT39RlR7J+2/Zsj2u u6TQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t62-20020a632d41000000b003816043ef5bsi3678079pgt.336.2022.03.25.12.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:10:35 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 83BCD1FCD08; Fri, 25 Mar 2022 11:14:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354493AbiCYHnx (ORCPT + 99 others); Fri, 25 Mar 2022 03:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354004AbiCYHnv (ORCPT ); Fri, 25 Mar 2022 03:43:51 -0400 Received: from smtpbg516.qq.com (smtpbg516.qq.com [203.205.250.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF3F2CA0D2 for ; Fri, 25 Mar 2022 00:42:14 -0700 (PDT) X-QQ-mid: bizesmtp69t1648194111t8ehr1sc Received: from localhost.localdomain ( [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 25 Mar 2022 15:41:43 +0800 (CST) X-QQ-SSF: 01400000002000D0I000B00A0000000 X-QQ-FEAT: rn/rQ7Qm5gWG7MK9OzE7viXDPDOXIZ6A7HRPLtLB+8P2biRmSSlRLDutLf3BE CvA92F+Mz5HxWCyPtVWWqMWpo8tO8FRx0BCGrdO6bOOXWPr3Uyj1ZtUg6P1iJfUx2AnAOvj P/U5rQAsuIwwU5qqyRasSkMKwKWFhgXM9sXusVjxRLTeSWLwsG0Q42BLrMuyksU1gV7qgLz JbDrl0f2m46gyH6vx5NA4BGGYrv05fXNQm8MYuE2t1hnVCzxEDFXd0onjfc6PoOssMPKjxP rzy4e1WxZ4ztI0RixKuhXhcTwbvybhWWAPRazXo5SI68CYsZcp5IECiVyhN72+9XZwOTTjT 0tm5J56hkc5XbmlJUfon8VYCi/aPQ== X-QQ-GoodBg: 2 From: Meng Tang To: stas.yakovlev@gmail.com, kvalo@kernel.org, kuba@kernel.org, pabeni@redhat.com Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Meng Tang Subject: [PATCH] ipw2200: Fix permissions setted by DEVICE_ATTR Date: Fri, 25 Mar 2022 15:41:41 +0800 Message-Id: <20220325074141.17446-1-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign10 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 Because xcode_version and rtc only implement the show function and do not provide the store function, so ucode_version and rtc only need the read permission, not need the write permission more. So, remove the write permission from xcode_version and rtc. Signed-off-by: Meng Tang --- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index 6830e88c4ed6..fa4f38d54d0a 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -1578,7 +1578,7 @@ static ssize_t show_ucode_version(struct device *d, return sprintf(buf, "0x%08x\n", tmp); } -static DEVICE_ATTR(ucode_version, 0644, show_ucode_version, NULL); +static DEVICE_ATTR(ucode_version, 0444, show_ucode_version, NULL); static ssize_t show_rtc(struct device *d, struct device_attribute *attr, char *buf) @@ -1592,7 +1592,7 @@ static ssize_t show_rtc(struct device *d, struct device_attribute *attr, return sprintf(buf, "0x%08x\n", tmp); } -static DEVICE_ATTR(rtc, 0644, show_rtc, NULL); +static DEVICE_ATTR(rtc, 0444, show_rtc, NULL); /* * Add a device attribute to view/control the delay between eeprom -- 2.20.1