Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1374923pxb; Fri, 21 Jan 2022 16:56:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGviWR6QOfrsAu7vJh32LHHs8YLZMWBfog5miSn7z014HYUPL8mUj09cDd15L3HzDQVP0u X-Received: by 2002:a63:9b01:: with SMTP id r1mr4521725pgd.263.1642812992710; Fri, 21 Jan 2022 16:56:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642812992; cv=none; d=google.com; s=arc-20160816; b=k33lzRdc1o2yu2Ao9c4m3wMXaAaNj/J4fFKy+Oa4Dp3MWUwv6R6CA3vOBo4f2QJddP zPrQ869OX8gw6nwa0lEjKkqw6fOoB0m3jVo/iQop2CDorbkMIz2qcFy3/Er8MOgeEWqj CItNdBClpKj42CxiU0MjQMClp3HP524mhkLjqOLCWNBTMyR/CdnJ6ccObHyR6f3DLWNn JDxVgMq8S8Uofi9zZmMfRJivcWD+wQJBtPeIIsAi/IifLHiX3uanamR3WO5t7e47mtS2 Ds2Qb8/hscmehaAJJnZI75verblChdZtglNC7vXORj/5A+rTyC0yow3FmdLDfjKSELdG KLWQ== ARC-Message-Signature: i=1; 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; bh=MBP92omO8oj01GPZ6ISbuS4yhCyIkyQu8ea7Yw2jTVI=; b=07BCof8REr7vEYiFV3S5arUulSKissqSKvpe7Np82Fk0GAum7FoMMH0JQeMcofHGOi 7MRCu6i1OVgU5HDMAhJyWw9kHodQTNIW6CEcm+a/OWkcIFqBuBBfB5uUpymBzc/gESS7 64SMIavMLGPZAiGVOrBabsglmlEu3uAvylk1v4yIsHb46xwLURENRQkLxBBNTk7L8iD1 pH4u5L2rRx+DtS1MfgzxjBJ5ea0q2EieQEvk/GMl5Ms3mhqOlDct4ZYqdWOb2okHh4pR xRNuCbB8mCODozlYJupp9d78BwxXiBYhNwM5NeEnggcfHF+lt8WO09VPYwMh6fLtQYXB n5yA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si7676008plb.345.2022.01.21.16.56.21; Fri, 21 Jan 2022 16:56:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350248AbiAULuF (ORCPT + 99 others); Fri, 21 Jan 2022 06:50:05 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:36995 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239121AbiAULuE (ORCPT ); Fri, 21 Jan 2022 06:50:04 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0V2RJRP6_1642765797; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0V2RJRP6_1642765797) by smtp.aliyun-inc.com(127.0.0.1); Fri, 21 Jan 2022 19:50:02 +0800 From: Jiapeng Chong To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] staging: pi433: using div64_u64() instead of do_div() Date: Fri, 21 Jan 2022 19:49:55 +0800 Message-Id: <20220121114955.96979-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clean the following coccicheck warning: ./drivers/staging/pi433/rf69.c:286:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. ./drivers/staging/pi433/rf69.c:332:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/staging/pi433/rf69.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index d64df072d8e8..ae4adeb00ce1 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -283,7 +283,7 @@ int rf69_set_deviation(struct spi_device *spi, u32 deviation) // calculate register settings f_reg = deviation * factor; - do_div(f_reg, f_step); + div64_u64(f_reg, f_step); msb = (f_reg & 0xff00) >> 8; lsb = (f_reg & 0xff); @@ -329,7 +329,7 @@ int rf69_set_frequency(struct spi_device *spi, u32 frequency) // calculate reg settings f_reg = frequency * factor; - do_div(f_reg, f_step); + div64_u64(f_reg, f_step); msb = (f_reg & 0xff0000) >> 16; mid = (f_reg & 0xff00) >> 8; -- 2.20.1.7.g153144c