Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1066554pxb; Thu, 5 Nov 2020 23:15:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeSOf4ZGuKxFOFSijWKcCAGEcaUD33y1jZFxtlGfeNA9813J6GM9N9f+CRjiiOBSuRhJMD X-Received: by 2002:a50:f392:: with SMTP id g18mr684702edm.140.1604646912130; Thu, 05 Nov 2020 23:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604646912; cv=none; d=google.com; s=arc-20160816; b=TnE12FtjnwEhEfcYoLPzgdvbgrxI79POaTXX1Acj0KTz/mU6OZ4VjlkI45cjbLNJG6 Lp7vtiRSd7kQtPe5pVZkAD4mFTRmH7yhDJkteVhwhkAul2fP55b0CPxVFjqP0mh/ynyu c9IwDhAZyhO/kvUEyRat1Vxd0vq9siGTZHw0eQvleMnA65o1iDXmaxC7wqmQFfOyOyIn /1jcEcTxn/X8B4ry5XKq6xgCYuvgXoZY+hdpa8EHtJSLtjLPKgtTSo03+rMR5tcAd5x5 1Q3MwSkcpEpdRGEJlhRXvu9zZq5dVIKlJ0Ive4lvFsrOeDeq9BxFltouWQhpX+XsqvRV kIFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=bF7lB3r/NRXSgPkzBd48IhmbCB8//G6fnlydYhLSsVo=; b=WOyAqnbDT5iTuVDfvUmt9AmKrI+kREyP3IoU9Q+/6oDL3O7LjG+o9pQyP4cyzO9sKY 6nRujkuhVY0yl/V2/o/Njo/9Y4QuoMkSy1sFQBX96WuVLw0ve+ajKhSw7E9kHA+LzvMv /hDD4pLzs7FGJxHYs7Sn6HKc5wO1kWuF27oRvNc/j5Dpm7ktoyPCloZUeobJRC7o/Fbl aHEf+GlP98LBbLzjhVBIxdhDLdk+Be4eee9cFcrfh9vZ3zzLk4kVuqAQCrgyxlRdV4Dm 1TqaRSuSDk0DK9C25oKX7FdcRQ5vTu70DAezl1plier6vj9xBvyWcJ9pq1zhIXWb61VY uipg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eKNlgEOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si366995edj.119.2020.11.05.23.14.44; Thu, 05 Nov 2020 23:15:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eKNlgEOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726248AbgKFHMq (ORCPT + 99 others); Fri, 6 Nov 2020 02:12:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgKFHMq (ORCPT ); Fri, 6 Nov 2020 02:12:46 -0500 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 199BFC0613CF; Thu, 5 Nov 2020 23:12:46 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id x13so241365pgp.7; Thu, 05 Nov 2020 23:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bF7lB3r/NRXSgPkzBd48IhmbCB8//G6fnlydYhLSsVo=; b=eKNlgEOijibnTTUH/nV+RFOE8NNpwdyEGIw4L/CPWt0mkt6is4glTtHwKnxPMorKs0 4Sz9orP2aqHt4FGv7iYZSTcRZ97O/TMo1gaAB9FYGf05/FCsHatPWC3SeBd0r1Ap2F2y 5XyY7QL4jhVrIl3IHATVl+DzK2sffLWRh3ClXQrgeSwqevgnsmcXQw4zHzSC6qIaWwkZ DhmncFoeXG8DI1BP/tgNF6y22I3E7JX+CeN6pxjpPtFBq87UBQuxanA6fxrPIlnzNt2N FpmQS9nInKf2KdHO/8Bon93++VzXi+H+WHNZET7qCTbyM306l030HkE1uCtH2ndGKt3w Qp9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bF7lB3r/NRXSgPkzBd48IhmbCB8//G6fnlydYhLSsVo=; b=D/w+GMODVS8O8Q7VZfCSVMWAcVPAOd+ftafJPz920h/VoNmV1tdfSPy/9LDsIlkPgd 9y1SVPNNIzZ5fzOaQmMuTav8obPdeLkl6BEhbFIz7iYNQ6hDNe3aYOOCZFnS5ICcoLs8 0qRC8dIJjErJgdzH1hmFmZH9D896/yfunKjmitgRjBkgzquF6UFX8wgW4kQybbBsAx48 ZrY1vmJXBt3eCbYkw9VtwdmUkC5XSFG3sPLRx9E6zB0Oypr4AU5osue7iOKJe8TYMycT NTffGGG5bEHzLch2ByMmcv8lEVh0fJLYERYmrp5bOs3FO4LPMlmOktFBte7zBb4lL0Kh mjmw== X-Gm-Message-State: AOAM530NnkRs2iMvcWh4msL26VoriNXtpHYLT8vBLYaECyC1zxpRCauE 718+9qeTXMjuvs1gOjNGPo2rp73w/Grn X-Received: by 2002:a63:a5e:: with SMTP id z30mr632484pgk.233.1604646765627; Thu, 05 Nov 2020 23:12:45 -0800 (PST) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id v125sm756935pfv.75.2020.11.05.23.12.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2020 23:12:44 -0800 (PST) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andrii@kernel.org Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Kaixu Xia Subject: [PATCH] libbpf: Remove unnecessary conversion to bool Date: Fri, 6 Nov 2020 15:12:39 +0800 Message-Id: <1604646759-785-1-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kaixu Xia Fix following warning from coccinelle: ./tools/lib/bpf/libbpf.c:1478:43-48: WARNING: conversion to bool not needed here Signed-off-by: Kaixu Xia --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 313034117070..fb9625077983 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -1475,7 +1475,7 @@ static int set_kcfg_value_tri(struct extern_desc *ext, void *ext_val, ext->name, value); return -EINVAL; } - *(bool *)ext_val = value == 'y' ? true : false; + *(bool *)ext_val = value == 'y'; break; case KCFG_TRISTATE: if (value == 'y') -- 2.20.0