Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp238119pxb; Mon, 25 Apr 2022 09:07:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkqrQp/LclMOVojKQjkg8GaPaSWYBTFE47gTZCTwpGKmJXNgz80iLwoIT81wPuDBJhSFih X-Received: by 2002:a05:6402:458:b0:418:78a4:ac3f with SMTP id p24-20020a056402045800b0041878a4ac3fmr19608421edw.196.1650902823714; Mon, 25 Apr 2022 09:07:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650902823; cv=pass; d=google.com; s=arc-20160816; b=hM3WnvCY2fFR/AHPlSMdBH+DIBjCRo4LbEijg3XCIukr1iNthrNLqk0PTZ1bPCR4Dt G2VMjMB9vVTz0NNkkbOs5S+6eSttgk/5Im0vgcCLHb43s8dpAexkTggFRZmEHq8Fg6Fv XrpYq2uz9hzxT+Lxpb/HkROOKlOvzzLaM+O8Y/ocpFeZR266Q7aC5MJsnt6hHIK6ujYp 7DGoXZNc0vf4NHM6vmdBJJH/SVBwzM7Od1X7yqYHMcxcD1gUIzSzjt4G7N0dIeZcImI4 bTw5JDxm5VxCvMa7l2Wpf29hhfFnilFy+nZxEhpgOvW7h1M4zK3wK0ZRmR01duC31rBZ tCxQ== 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=E7RdCTV7+3DP95M5GJ/3bHKwcDL1cFUtBMaATWIA/jQ=; b=EzvMfzdWlpsxp41wHyRjT8DC4oKOBbMQa5bJjlWmKSqconWp4ioAHN/uLCVCszdfzq tCJ4hnrw6b/jFb6da1HoChR+wPVGjvbnPvOfB3wSY1tVd0BU1oVLO08cu4ELi76fog+G tVpPyavjfLYh2LGJvnToYzNv8Gy3kiBId6cZ+7V28CSS1fm8W8XMSKnIRYF/R+nvhs7E NZBiHOBd0FE3o3IgAaY2xOKYdOrPbJVc7z7tx3Y4XCmTG33GGibbZVNd5ffnIjjgm8Dx incADef1Z4zi0KmykS4IQiiJYZFos7m8xaezVOb69/Pwe190BsRk4GB5EszTkz1YuXdM hMvw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.cowan.aero header.s=dreamhost header.b=b4KQS662; 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 s3-20020a50ab03000000b00423e027bfb9si13676047edc.429.2022.04.25.09.06.37; Mon, 25 Apr 2022 09:07:03 -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=b4KQS662; 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 S242666AbiDYO57 (ORCPT + 99 others); Mon, 25 Apr 2022 10:57:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242605AbiDYO54 (ORCPT ); Mon, 25 Apr 2022 10:57:56 -0400 Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A7FB36319 for ; Mon, 25 Apr 2022 07:54:51 -0700 (PDT) Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E5B484C131F; Mon, 25 Apr 2022 14:54:50 +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 3A4F04C14EF; Mon, 25 Apr 2022 14:54:50 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1650898490; a=rsa-sha256; cv=none; b=Qv5pdPBXIhhxPP0diy3cv44dDzGzcdi1DtgvFfn9fDpc+hBu0+5kjUsAZ2DZSsYGofm8K9 gSwX54wG7e84VxuQV3omoyt/Ccw4Eca5Fv0+ynrOeBInDPoeJhxZVuf/9axO20DEtMPC51 pUjfrlVznpXK1I7WsrFFrGvh3FVLr+TfziiNyOdt1kvW/tffyydM4oFvmHAtQdJSEcsHA5 GCwKN4S3ldoOOmmCNBnO3fneIGrEfL/dEF2AVlFMal0KHnvLhOSn9cpzDj+iuxrbdo5CIn vmfLYI4iPZvGtYvsIYWslWdYF3pll7wVKqklu5KBp6FDzWr0Y3ztxA65qZd9lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1650898490; 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=E7RdCTV7+3DP95M5GJ/3bHKwcDL1cFUtBMaATWIA/jQ=; b=NNWXZ+aeIDDnfaN+xPtaep3ed8788+AR0D3Ywcw7vraURpVau6quoiljynN0vCClFtAdIR i30CXEnLR0AiHiTHeb6at0J3xkY4LrZiDx8Z4yaZ70+Kgkpd1nShENzuJ0iMHUimv03AzU mroTXfgsAysWFYKLbrRDRwlMc2ztTbBV/g7JF5GGMKM5VvdKYIlL4ZmQkgd56gLjE0Nsh4 7aNqE1swOSPyiiIE/wolfi7abyFxSPV+rdY/YbdbueTYUbp9YBgSbMBxqlZTvgjuIerA9V BgmjWEdtCu8H69/ozcliqV+i+KC5qYCJCBfoVqGiCyfCLi9pcDCk+ago0m60QQ== ARC-Authentication-Results: i=1; rspamd-67b64f579b-xzh56; auth=pass smtp.auth=dreamhost smtp.mailfrom=ian@linux.cowan.aero X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|ian@linux.cowan.aero X-MailChannels-Auth-Id: dreamhost X-Spicy-Little: 6516efa239c93994_1650898490701_992106049 X-MC-Loop-Signature: 1650898490700:3349046989 X-MC-Ingress-Time: 1650898490700 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.30 (trex/6.7.1); Mon, 25 Apr 2022 14:54:50 +0000 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 4Kn7Ms1GtWznb; Mon, 25 Apr 2022 07:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.cowan.aero; s=dreamhost; t=1650898489; bh=E7RdCTV7+3DP95M5GJ/3bHKwcDL1cFUtBMaATWIA/jQ=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=b4KQS662s+1BjaJB2DzHSw7988VHh4EMJnvXH3HNOxUpkZo5ft9qVRx7cUHB3EoPt 0DX6pItMkxYOP3COUU/xZFYlqsjTc6/aZvkiVdGhDu+1SqMh2moZXqGuxKmOiy9wZb CgIQr/rr4WHv6GZDlo8Hci63Hkg/Wzd1M8Zcsb2NSYHYrnZJQ/Mh1TwVtJbH1zoEdS Yyc7j8oAnwdJIeg66EtdFPjncU4oI0DTvMHIs28Rbwx0lRqnuUhnQtBbzL884PKuhP 4IWbLf2PxG9bU6YnKK3MDta9ovBM2gVmtKfjzVMKidA2V89ZNWSgLkp/wlyfglDsPQ vBZgyLnxpTQqw== 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] staging: fieldbus: remove unnecessary double negation Date: Mon, 25 Apr 2022 10:54:40 -0400 Message-Id: <20220425145440.146891-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 Remove the double negation (!!) from the code since this does nothing and may create confusion on whether or not those values are negated. 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