Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp522050lqt; Fri, 19 Apr 2024 02:56:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvrW5xxZklvdwoqRHEWq+fLSlUextimo7P44EFasZu/dGc0/vrxPnY6exc0Ep/IHm5MN/rEcYiumuHx/1VIilL78DUgRMH8dKOU2jZHg== X-Google-Smtp-Source: AGHT+IGpJYAVwEwdPRXY6CCAPoLMrhS7Hupurv22TTNtKe+Z4zMpUqaapvL3IoAkbJ+kLiK51xsE X-Received: by 2002:a0c:fc09:0:b0:69b:7eb9:1392 with SMTP id z9-20020a0cfc09000000b0069b7eb91392mr1565586qvo.62.1713520566557; Fri, 19 Apr 2024 02:56:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713520566; cv=pass; d=google.com; s=arc-20160816; b=J5qvLU+OXAS5mqQKBy8nntCWd2SzuNXdotFcjtDwj3nO3JoLenqHeOXViP76fCMzCW IzFnOz4XhGhTaIVH/N0fvsgIIB6BG523Bj6/wbMb8HILiZsG0EHIzDqHinoExQ6TDqFA fvAOlibvJ0isbJPU1njoXQn8dAp2q7Zfj3a2WamyUlGVj0f2/oHVM8DuwZ002s8LsUcg LVOpCikWSX4dA9Lr0G3NBd4gyca4Jj/2jqqbj3FhvLF0OmmUMK/PVUXl+aV+uWGRiVd0 MsX8qryqAPJYsjuczyt6DFOSZIZHZLqGljF/zac96wJxvMDqWwt8tM3MndjbdOR7bRNm xIrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=H+ICFE9T0WtFgFxAAIzneJg+RkmVbFrs0mrpkqFICS0=; fh=bpCvU95nac8WR8iH23m18VM5TN1F4ed72DEjGinQTZ0=; b=csxUjbnencngramD1CMbEUvVOTMiRi4r8iTG/nvqrLMHLXJU4/rLUm00FKm4dIwPGx kquvuYmAh2YhBwR267I35pKMD161J2JC7ZEwbf7ipS//mVDwyUace+IUvCgAa7tVpKjr k4azGrYHiEtCaEVX70QHM7pmKjwnNP5Pi2ImuWdB2XWVRBUT876x5+5hZmDgRwGjyJfM ilHeGaGHlmYAHJD0v9bsyFiuA78hypHAeZ8q6GHOGXzt+7pojjZ+AdfLH2Zpe904Sg4g EBXXdOqLeS+4tIuQ75K2KLSBBezp1xjp22L+3S7mxSbIiGvfd/ZYwxInqFbquI5fyZ6J PT5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=N+xoW+Fb; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-151268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d14-20020a05621421ce00b0069b1f3d6634si3540844qvh.471.2024.04.19.02.56.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:56:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=N+xoW+Fb; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-151268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 42E1F1C2138C for ; Fri, 19 Apr 2024 09:56:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 111B91311A2; Fri, 19 Apr 2024 09:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="N+xoW+Fb" Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF64412FF87 for ; Fri, 19 Apr 2024 09:49:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520187; cv=none; b=W08mZTEBXPlnJwe1Pg6bxRWkaBWKXEd1jYV3ROeFeZCrk/3C+rAJAqlRvqbNpuWf6yEPHOowAQCkzwPDRWAeMj/LVwKP5GSfZS0g+WdBHRMMWzrtw7VkvEEEgb4oS2umNGSQUZQtB68mIA5ZLlQGGYxoep8x0Uw70/FIjpj3Cc8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520187; c=relaxed/simple; bh=A2Ua3QkuJFffFg1BMdgqwGEYAvUbwmxlzRDyBr/ON+U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=J7JJLfZLbN1jMqt1Y2jBAeZ1FcDkQP4H610YB7b4W5H2oJO3EAc0nC+ZaBCv9KqA1Uw2vcyWvSUyLvzA1R574RktOvsnUXkWhKlGE/AtB/0vRtnKGus4iLbxnHx17FM+iAgGHf2HiuMnQkZjb6gPDoz5771JgXO7tW/gykMZLo0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=N+xoW+Fb; arc=none smtp.client-ip=209.85.222.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-78f056f0a53so125561985a.1 for ; Fri, 19 Apr 2024 02:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713520185; x=1714124985; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=H+ICFE9T0WtFgFxAAIzneJg+RkmVbFrs0mrpkqFICS0=; b=N+xoW+FbvAW1U01bcSqZ1e5hU7JIJyr6JEM18PiqKQQnR/OoeafWCtZDlYYvVCUkj8 G46WocLXkmNHBSwUIGTS8rIw/QIS6s/LYw/WyJaXtEdKLoJESgPkTBWo7VjuxjQb/f1k FvNS6bSLcK4TTMAnrky0r7s5AsSTt1YQWg/Og= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713520185; x=1714124985; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H+ICFE9T0WtFgFxAAIzneJg+RkmVbFrs0mrpkqFICS0=; b=Dgh7KZlRjieZ4FVgcHZ85DQtIedCBZmHkzh4dOHD+qnWgYMpJXRNjh7PE/uVJtQTW3 rPFZl+5Dwmo65IW8GroBQfl9V+IuiFLBIJMa2k5Z7659yWoNSLgubZgRct8ktiFFcbHj wFhppCQj7/mwJNMAZpr/ftiUGb3PZJXiclnCEvAE/1GcXGX6q5/+7rVp23XEAGD107lK iBGNH8rw5s7/ZCcXF716rW2ihh+COfyOvknwDx5Myzxabjus4OJZ5QGk8ftJV6+zBET7 hm/bqF05aMFqEPGvTO/wrCtyUHG0Z80FMcAycro8DMXxkwyXXaZ4rciLNh75KNjCkxnT +I6w== X-Forwarded-Encrypted: i=1; AJvYcCVXBO6miJECfAXO1JEy3QVMNQGHRfegAmz1RXNOb3Z0yEssQLYuAVmd/D5vGVeHuWxOPd2yWImLwiMc6ngstL3mBUyT3i+o0hYgi/6N X-Gm-Message-State: AOJu0YxTeik6NKxR1EVAzibxzChlblnMs3h+zrwYhv1Hxtr+TpRXtquh tuDB113fRzQ6QDxqOqPLQjQvAL/Q886CepC6UgWNOZvULBlWT9bBlmwbJmgE+g== X-Received: by 2002:a05:620a:1673:b0:78a:33f9:908c with SMTP id d19-20020a05620a167300b0078a33f9908cmr1816540qko.36.1713520184948; Fri, 19 Apr 2024 02:49:44 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id dt14-20020a05620a478e00b0078d735ca917sm1434532qkb.123.2024.04.19.02.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:49:44 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 19 Apr 2024 09:48:08 +0000 Subject: [PATCH v2 22/26] media: tc358746: Use the correct div_ function Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240419-fix-cocci-v2-22-2119e692309c@chromium.org> References: <20240419-fix-cocci-v2-0-2119e692309c@chromium.org> In-Reply-To: <20240419-fix-cocci-v2-0-2119e692309c@chromium.org> To: Martin Tuma , Mauro Carvalho Chehab , Laurent Pinchart , Hugues Fruchet , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , Sergey Kozlov , Abylay Ospan , Ezequiel Garcia , Dmitry Osipenko , Benjamin Mugnier , Sylvain Petinot , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 fin does not fit in 32 bits in some arches. Found by cocci: drivers/media/i2c/tc358746.c:847:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. Signed-off-by: Ricardo Ribalda --- drivers/media/i2c/tc358746.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c index d676adc4401b..edf79107adc5 100644 --- a/drivers/media/i2c/tc358746.c +++ b/drivers/media/i2c/tc358746.c @@ -844,8 +844,7 @@ static unsigned long tc358746_find_pll_settings(struct tc358746 *tc358746, continue; tmp = fout * postdiv; - do_div(tmp, fin); - mul = tmp; + mul = div64_ul(tmp, fin); if (mul > 511) continue; -- 2.44.0.769.g3c40516874-goog