Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3326992ioa; Tue, 26 Apr 2022 01:06:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOeu/qRIL+iCvK3hubNqIKX2+rlBI6WjOy9nsT6E51bDXV00ZZYrk2nzFIGAFDZzrLh56y X-Received: by 2002:a17:907:3f02:b0:6f3:5c42:321a with SMTP id hq2-20020a1709073f0200b006f35c42321amr18456377ejc.521.1650960380479; Tue, 26 Apr 2022 01:06:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650960380; cv=pass; d=google.com; s=arc-20160816; b=aN+Ilt6UrnUpeeW76Hq1j9AsMNgo4XiLJAwcdAxFBd+yB35+5vPoRmVMkhMe8QZ1iR S6z+smSRQZL/RNbd+ERNIyZ9Nxp0+sTSgN5L5zQD2/JtOIgkKKJP2HbAunW/2kh41f2V 3NIxTAXn0dahD2YWznF3z1vVsNFWmtBYmViwqPi6Tr/qu4WL62QFDgmrg9ccKPo701Pu qblXQLttoG0o2GesBJ9sRyjbWbQHTHrboeyNWOoK8gbEa/9BQyy1EU8SIu5XKMzGDCKy 9lWWDTfGfF05bfDvBa66oBPBnfkcelTAlLMWoPUj53ChaBoaYTS5E8IyATOfyArQCqsi KFEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qrIAaUSjnb2wlp86fkBj4QhxXpIqPeoU2r+zy2bjOXo=; b=AiYB10uNJCMjdruftaWT0FrqHRfH5aS7Sh2NHCw8uTYRu61JeW4uMs1Z9Ne4ZlW5TD 4irrWAEq1RrIAN8CJ/AHC63f0B20S7kofH4iyJZoICiUy7hYVGDt837OQhRRgYs30caG QcnpHybZRY+Yygga8Fz+fdGKElTwwzpJnGoDQhfC3fJ8Sas1GMu0DFCmPlSka2lA89nA v9t3/0V8dcC4oFA9PrU3++F/X0Ud0ZHzergcgqlpdFkqoY7kzFPozXVCbWwIggODS6F0 NvXPQk5nW97WHb+/XKzSlt9eLEd8B8TULeh7Evjngw1rWTiqSdMaz71kaF0W5vMMijMd Pbkg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.cowan.aero header.s=dreamhost header.b="wi/qHUUa"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cowan.aero Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a17090614c900b006f39bd92b86si3750909ejc.579.2022.04.26.01.05.55; Tue, 26 Apr 2022 01:06:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.cowan.aero header.s=dreamhost header.b="wi/qHUUa"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cowan.aero Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233064AbiDYWgs (ORCPT + 99 others); Mon, 25 Apr 2022 18:36:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbiDYWgr (ORCPT ); Mon, 25 Apr 2022 18:36:47 -0400 X-Greylist: delayed 458 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 25 Apr 2022 15:33:40 PDT Received: from crane.ash.relay.mailchannels.net (crane.ash.relay.mailchannels.net [23.83.222.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4886BDC996 for ; Mon, 25 Apr 2022 15:33:39 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|ian@linux.cowan.aero Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 413BB8011DB; Mon, 25 Apr 2022 22:25:38 +0000 (UTC) Received: from pdx1-sub0-mail-a217.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CB72980109A; Mon, 25 Apr 2022 22:25:37 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1650925537; a=rsa-sha256; cv=none; b=F/wx94kfenO3fjgrOI4AwghZ2n50+gkSoBpcoeuKVOps8GDk/wksfJdK1gTo2o/YmR10Zl snTx6m4Kk4VkkWXmZWDC0s0U44l2lS5+Vhao2g/AJQrM7wllhzFMWmBZvcEKfSF/r0vc7W cZg37BUMYP9x2YUcKLTImQ3X66KNobn5eFvtr35hBQFAAyTPowk54+ermY6ljgGLCUqJtY 0pqXbHe1ifwz1zht4xPlnUkP1lR7Ci8JU51OofmGHp8Adk7YICEpODyjKiUO2ViYuoppON ZvasyIC2KVZordPsG/W65YvA2Mq/K6onTpG0cF+kziSuOBCtBLyoyrODXSgNMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1650925537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=qrIAaUSjnb2wlp86fkBj4QhxXpIqPeoU2r+zy2bjOXo=; b=ndFeoIBj6LZ+Q528R9oyeR+sLkyYniiI7odjOr8tJ8WsYZCs16YDLJUWckkVWO0ZFdkBMR YxnRqq7WYWLkBVnzXAX6tZ0yOhTeF0034tSieTmivsnvV+UNO8N29pE5QGQiBPmbBeHqdG 02U9KQIoF6rOKTtvay2YUoxEZ/qnFNuSfS/UNu47ZAGpjvLimSFP3Jy3HwbsVumQSlJolP Axj0kT4pul4C7I3AX7Qf1iIpCvCNWK9FbVNiTcCk4I32aHONRzTpPcsPNTq2zAD/LPiGwM bGH6DLQ2uYgH8CPFFNK92f/RKnBDoFR3oVoxAhw26nTqdHiu1NLwspFXpqTk5w== ARC-Authentication-Results: i=1; rspamd-67b64f579b-dhxks; auth=pass smtp.auth=dreamhost smtp.mailfrom=ian@linux.cowan.aero X-Sender-Id: dreamhost|x-authsender|ian@linux.cowan.aero Received: from pdx1-sub0-mail-a217.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.96.48 (trex/6.7.1); Mon, 25 Apr 2022 22:25:38 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|ian@linux.cowan.aero X-MailChannels-Auth-Id: dreamhost X-Irritate-Descriptive: 173270db09277b4f_1650925538102_2579386843 X-MC-Loop-Signature: 1650925538102:2428176500 X-MC-Ingress-Time: 1650925538101 Received: from localhost.localdomain (unknown [69.12.38.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ian@linux.cowan.aero) by pdx1-sub0-mail-a217.dreamhost.com (Postfix) with ESMTPSA id 4KnKMz0bNjz3D; Mon, 25 Apr 2022 15:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.cowan.aero; s=dreamhost; t=1650925535; bh=qrIAaUSjnb2wlp86fkBj4QhxXpIqPeoU2r+zy2bjOXo=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=wi/qHUUa+5Xgij1xZFcQcG1fs5arzExUI+HRyTxGN2Nk/QU2JwZ7ORPGbWbJ1BpSv 2EwTOsm49ZxieGyjmaJFIInkv6cozpBjXdI1qvl5papF9GCgK7zn3DvbOeeyk/hnop zoyr9hZopx0pqhOxGAzst6NCCHfxX2ldeNWTI8a6Ijstkup5/n4QmQKlppPeIIy7Us 9ECXa4NtwFuavYKBE9lZKI3n+t/x9rd4njCFQwwB5pjR7gIXSyjozt+3tGJKn9mINV obNmq40tZTQwQVFoh5uO7M5v04jwsRhSnicqpX6SfZmEkWjnqBYiGjU2VdY22GFkKU 7lOZGNKKNR2cQ== From: Ian Cowan To: Sven Van Asbroeck Cc: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Cowan Subject: [PATCH v2] staging: fieldbus: remove unnecessary double negation Date: Mon, 25 Apr 2022 18:25:26 -0400 Message-Id: <20220425222526.6023-1-ian@linux.cowan.aero> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 The values that are being double negated in this case are booleans to begin with, so the double negation has no effect on the result. Signed-off-by: Ian Cowan --- drivers/staging/fieldbus/dev_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fieldbus/dev_core.c b/drivers/staging/fieldbus/dev_core.c index 5aab734606ea..6766b2b13482 100644 --- a/drivers/staging/fieldbus/dev_core.c +++ b/drivers/staging/fieldbus/dev_core.c @@ -28,7 +28,7 @@ static ssize_t online_show(struct device *dev, struct device_attribute *attr, { struct fieldbus_dev *fb = dev_get_drvdata(dev); - return sprintf(buf, "%d\n", !!fb->online); + return sprintf(buf, "%d\n", fb->online); } static DEVICE_ATTR_RO(online); @@ -39,7 +39,7 @@ static ssize_t enabled_show(struct device *dev, struct device_attribute *attr, if (!fb->enable_get) return -EINVAL; - return sprintf(buf, "%d\n", !!fb->enable_get(fb)); + return sprintf(buf, "%d\n", fb->enable_get(fb)); } static ssize_t enabled_store(struct device *dev, struct device_attribute *attr, -- 2.35.1