From nobody Thu Nov 28 20:47:59 2024 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (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 ED1F91BBBED for ; Fri, 27 Sep 2024 10:02:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727431365; cv=none; b=fsOuru1AqUKXfEmu5nVlHrK8Slgk0OFKXWqHC/M/HDmgdqv4CD4LF7GOB0ur1c0Ivs47dwtMbEK+FaWzuSardxsB2GwQOt0hHl3GRMpC1LzHVAUJ3payTQ31lVczF2qTO/0YITLqLp+zdXbIspW0DyOzgZ+EEf7Y4Ikgm17aMRE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727431365; c=relaxed/simple; bh=NzGO/n5w0inQUSk9Mrg2JWrHNdom3NBH7egriAh15og=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z0tpPa/bAOVONeMtCgndb3wEtPLBgAG1m1/55p911pCqgAPeRPsQTfQ8sLKRfw/HxBzfwcD0Fw0+2HnAxv8ormIMytTe03ciNHH+EsJL0s64QIDNbuuGZQUfJByWQdi8jUNJ7TCeqWra4jhUAXYtFJrqkcLGowDCFoP/u7XopxA= 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=gJvvCEZn; arc=none smtp.client-ip=209.85.160.182 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="gJvvCEZn" Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-457ce5fda1aso14542441cf.1 for ; Fri, 27 Sep 2024 03:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727431363; x=1728036163; 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=YwJYpIvOPMah9ocVmXZ/vnejPzGmcFsHFsHmC+ou0no=; b=gJvvCEZntTJEMer4VufqglsmJ0gIHevwjXMbdMzjWaVqnt7cWdWKGZkQ8zilkiEIya jbzzJIRhD6N6lr/5H/WayIYJAfsou3RmraN0o98BHgstq39xQLtO7XOZZEUrpH2F62KH gqaVVTOgKu4D1La8fU19sOqpjfm3Tfl3teFMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727431363; x=1728036163; 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=YwJYpIvOPMah9ocVmXZ/vnejPzGmcFsHFsHmC+ou0no=; b=vttEvnHCjUhrpTFg1vzCV+ydq6UufxkNchc64ixfdFf/21QZX/Ep4I3TptuF7Geg0F mtCX4J5suRhE0N4O2JhakN1hEyX+objgtP8VusmFyUrdTn9oj/hdwMPIWv8UqBtlOh4W 8gbdY/Om1YC6YjsqwBGhoi6IpUQMUGu4iYYJ6HGX6yigKriOglrR219Ccs3JQrF+wJ4G 75E/vlrq6eXVCghz6VZpFt0gZN5F2EBa/x7fXxk64jKWW6XHoQMQWAec1xBJz5teV7eE ICJ5juPk9mTTqKX6AiOHVAl5sZ02pe55kE7S77R+Ykt+uOQWnaaPTTdap+jwvpogpo7J SSMw== X-Forwarded-Encrypted: i=1; AJvYcCV8eoffTnfzuywToaCyv0q9ecWO/CTz5+k9IgG59xC58nluwvTjNXgnHDe6OecVQgvkSQvj7FLaFbIhtbE=@vger.kernel.org X-Gm-Message-State: AOJu0Ywow4H1FWn2kq+dyWic2nXRwWciTG+kkJ53De5GkUw4V9S3+0xz sVShmnK1GAku86oBv3fuAk8LAk16Y/j+ol1fQdhBmy7vZn2S9mAv697xGSNl9Q== X-Google-Smtp-Source: AGHT+IHIhHVv8+j4NztQAIQhmr+1bNXNkJaWVfqmXRAU1YfyFDkrgQwJlMA6+y72ZjS/zMeolaZGXg== X-Received: by 2002:a05:622a:1208:b0:456:7fb5:1bdb with SMTP id d75a77b69052e-45c9f0aae7emr47154531cf.0.1727431362859; Fri, 27 Sep 2024 03:02:42 -0700 (PDT) Received: from denia.c.googlers.com (76.224.245.35.bc.googleusercontent.com. [35.245.224.76]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45c9f353f08sm6341091cf.94.2024.09.27.03.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 03:02:41 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 27 Sep 2024 10:02:32 +0000 Subject: [PATCH v2 1/3] media: ti: cal: Use str_up_down() 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: quoted-printable Message-Id: <20240927-cocci-6-12-v2-1-1c6ad931959b@chromium.org> References: <20240927-cocci-6-12-v2-0-1c6ad931959b@chromium.org> In-Reply-To: <20240927-cocci-6-12-v2-0-1c6ad931959b@chromium.org> To: Benoit Parrot , Mauro Carvalho Chehab , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Greg Kroah-Hartman , Hans de Goede , Andy Shevchenko , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 The str_up_down() helper simplifies the code and fixes the following cocci warning: drivers/media/platform/ti/cal/cal-camerarx.c:194:3-9: opportunity for str_u= p_down(enable) Signed-off-by: Ricardo Ribalda --- drivers/media/platform/ti/cal/cal-camerarx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti/cal/cal-camerarx.c b/drivers/media/p= latform/ti/cal/cal-camerarx.c index 42dfe08b765f..ba8c4743f539 100644 --- a/drivers/media/platform/ti/cal/cal-camerarx.c +++ b/drivers/media/platform/ti/cal/cal-camerarx.c @@ -191,7 +191,7 @@ static void cal_camerarx_power(struct cal_camerarx *phy= , bool enable) =20 if (i =3D=3D 10) phy_err(phy, "Failed to power %s complexio\n", - enable ? "up" : "down"); + str_up_down(enable); } =20 static void cal_camerarx_wait_reset(struct cal_camerarx *phy) --=20 2.46.1.824.gd892dcdcdd-goog From nobody Thu Nov 28 20:47:59 2024 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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 F1E721BC9EF for ; Fri, 27 Sep 2024 10:02:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727431367; cv=none; b=ePFVplQIdyr76OfTzO3Geg9HbEFXG2z9LN4L4q9UjxEb3DzDy0Pgx0v2mcq6M495x6FYr1ZDKqbnoZ935sA+zwuU0GDDZzSUwOAY/VK5QW6+aPSfhPBES/AlPVUGII71M6z2XciiOJJJmF2DySSIPQo9guo9Xa3he5iy03jA54A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727431367; c=relaxed/simple; bh=PTbEhgOwL2JzDldEWOrtkAWFRntEHE0H3eDBOM54qRY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ff8TFpRJFm8fzOK7XDrdR1nYN9ZQkRoFss1KZqFJq7CQwLec5sgOwQ0zEPZjWd4BVn71P12QElqGnRQuk4iNUoedUmka1VsKjZOcQ07aktN69tWrwW6+jmFdLhkUIQx54i9DrP+OxgnZbpz8MaeXM24K61faKxKkxXFjy2xQQGI= 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=a3tTt5t9; arc=none smtp.client-ip=209.85.160.180 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="a3tTt5t9" Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-4583083d019so11506091cf.3 for ; Fri, 27 Sep 2024 03:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727431365; x=1728036165; 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=1m9W940jAO+8Km9/nF0drShVWDtg5UbNpWglt9zOgsU=; b=a3tTt5t93SX+WJiy/eM2VdHPItce4H9jkbXH8lUDzqUTAnnEmOVP+qf8HGAUSQ5MOm 7UxPsLli8cxjMmBsjDQo4dPbofZUl1+Tab/pGF9dyg5TZdhbjSMxCCScakRB6xYXD0Qv RKHNpI/72UtW651GohBNPHgrM8pAIYGpfNFtU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727431365; x=1728036165; 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=1m9W940jAO+8Km9/nF0drShVWDtg5UbNpWglt9zOgsU=; b=cHDHDjszuAaq1R0mm4ENEgqX4NmbrwbLd5Jsqk+ttqyvo24C/gz02Pp9YCb8ltnN9N kQGZkIa8BrJVjigAKGCjkqF5ZQt/ke9YktR/6ypgmAQEaYISAmcltnrSf7xl8QblruaE 0LxiE71RGEQjcbXL6UE81GNT71HkoyMtHx1pCYTexaA/XbeYn8sJpPuKppbJfpGHcbyX E/AV9lv07J9rqd+UoRhNSEPbO95R9YLO25bp4O46USoTziIzfmZVvliXwsNBSDYynWRn xjNOocrbyauVkjK80brPcG4uNxpSMvCNhrVTA0HknJfXtg7h3N6xsw46p4qHIP+z+mnL tYvg== X-Forwarded-Encrypted: i=1; AJvYcCW7eHt2NiVmuWmuu9akA/TLdDaacntjUtXK82qbio+Icz2fvfGxCCm1rsbkbx6rQmRC5vOHxW6DZuKKizg=@vger.kernel.org X-Gm-Message-State: AOJu0Yzt5D2JlCpZTp+6Cf2jBByltU/aSyT54z6ulEFYqn2dI+oXC9Yk rhN9Rv2lQjqINTBdetAQAUdaMStcvWBdZNMcyIqB1zrk5bybxAE1IbygJJx2pQ== X-Google-Smtp-Source: AGHT+IH2sKCy00o9ozG8YLnnklYCCyOzAtra00mCyeon7eku4D7Kt0x2E5WOjSuFyndy4gbIgtSOMQ== X-Received: by 2002:a05:622a:1186:b0:45b:6042:be44 with SMTP id d75a77b69052e-45c9f270f47mr35119611cf.42.1727431364785; Fri, 27 Sep 2024 03:02:44 -0700 (PDT) Received: from denia.c.googlers.com (76.224.245.35.bc.googleusercontent.com. [35.245.224.76]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45c9f353f08sm6341091cf.94.2024.09.27.03.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 03:02:43 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 27 Sep 2024 10:02:33 +0000 Subject: [PATCH v2 2/3] staging: media: ipu3: Use str_down_up() 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: quoted-printable Message-Id: <20240927-cocci-6-12-v2-2-1c6ad931959b@chromium.org> References: <20240927-cocci-6-12-v2-0-1c6ad931959b@chromium.org> In-Reply-To: <20240927-cocci-6-12-v2-0-1c6ad931959b@chromium.org> To: Benoit Parrot , Mauro Carvalho Chehab , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Greg Kroah-Hartman , Hans de Goede , Andy Shevchenko , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 The str_down_up() helper simplifies the code and fixes the following cocci warning: drivers/staging/media/ipu3/ipu3-css.c:229:18-47: opportunity for str_down_u= p(state & IMGU_STATE_POWER_DOWN) Reviewed-by: Andy Shevchenko Signed-off-by: Ricardo Ribalda --- drivers/staging/media/ipu3/ipu3-css.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/ipu3/ipu3-css.c b/drivers/staging/media/= ipu3/ipu3-css.c index 1b0a59b78949..bb22375481a0 100644 --- a/drivers/staging/media/ipu3/ipu3-css.c +++ b/drivers/staging/media/ipu3/ipu3-css.c @@ -226,7 +226,7 @@ int imgu_css_set_powerup(struct device *dev, void __iom= em *base, state =3D readl(base + IMGU_REG_STATE); =20 dev_dbg(dev, "CSS pm_ctrl 0x%x state 0x%x (power %s)\n", - pm_ctrl, state, state & IMGU_STATE_POWER_DOWN ? "down" : "up"); + pm_ctrl, state, str_down_up(state & IMGU_STATE_POWER_DOWN)); =20 /* Power up CSS using wrapper */ if (state & IMGU_STATE_POWER_DOWN) { --=20 2.46.1.824.gd892dcdcdd-goog From nobody Thu Nov 28 20:47:59 2024 Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (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 C9BBB1BD01D for ; Fri, 27 Sep 2024 10:02:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727431370; cv=none; b=ctwHbo4MyZFJxTNCS7fMyLMmSrLsITzSCGXqOSKaFFjcBl1g9EF267ifdCb0rh/ixBly4mtzaxaQCJzRCK4LYNQCzSIhjN9lrgVgUs6amWc8fAEIJzaolSwkwMXz18V8suUsFoITnBuSmOoZoUnCiQ2qbWGIJJDnMEfQB8KVW54= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727431370; c=relaxed/simple; bh=uw0K97JV9fivxdnVN2cUQwyp6nbgfNRKN3h76jkLFYY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lCULFzq55HSBWsGcK/j9qQI+CgS/GyQiJwXb+19E64Ep6wjoOHhZ7AuqL7kpoAxEVSDJn0sMUIUa6alanYDYKIfwJpEWRy7DHcRIXSLhLjzMqmWcaTRc84DnU+xHiOGbp/l6MRvLiA/1kjsx3+8LakmIrHWpt/VQAe+0mFWNsL0= 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=WxQPytC6; arc=none smtp.client-ip=209.85.219.41 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="WxQPytC6" Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-6cb29ff33c5so15746256d6.2 for ; Fri, 27 Sep 2024 03:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727431368; x=1728036168; 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=mSjw1khDQimJSSBzxeMp5r4khGbQqGrktSmSipAyKGM=; b=WxQPytC6OZ04vlGKZs5Eg8aZM1+av+9SLcNLIeygjg1vxW5uOCmI/2ZvUDtUr/6Zcc NM9ql9qHlbmWUxxFRnGnhP71ses9FDo5Cqi6fdHGWN5CR6vM04i5aVlLjiZmxk4ZaQmF O9hbm/zC4b4QeqRFoEVRs92NUW2JEmeTY4gN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727431368; x=1728036168; 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=mSjw1khDQimJSSBzxeMp5r4khGbQqGrktSmSipAyKGM=; b=Kl08Ko4ZjetszP+SUtJ+Sl2jlubuTep7vPnsEfnp2LASL98yF3dA9WY0XATvR16+jZ IFUK30TzmyAdLkW/WyIUEykjRNvVvaJEi2xiFR71Td+tijKTz0281aS+Ddnt2jvFI2No yp+DRDjQ4BmikqQM2fMDrSY+ueAGUrxeDjFTsqf97P3Uy4R42uRA82Vmm2L3IBy/lv2r 18w5gTJKYgt58YAb5ksg53GHHesw1I3GWo84IuaPkqbV8rR6B/KSTrVtb/c0s2YLOObB WLOeip10KUGoKz4NheLUTbiLjZMRGFj/EX5g5JADKPy9UK6LYe/M4cc2QIj66G0KDIan SPTg== X-Forwarded-Encrypted: i=1; AJvYcCX/pELBHW+tUpXbTsSalBjoxA9781lhSdmImNGwbkCY9mHM8k0S8QiG+5xbG++BfqKnwXzNLhx6uxS9hbI=@vger.kernel.org X-Gm-Message-State: AOJu0Yzaxsr3nNvhjyyXMIIlB1Ao1EmyG41uVX/Ygid/klpnRpLxps/q Hpzn/zqddFwLrHgcruG9FoeHkKuO05wl5rff1S78JQxyUm8ypw53pwA/T9/z6w== X-Google-Smtp-Source: AGHT+IGmj2VIw5fwcR7lMfdlhGfeKlUZ5ZB5sGNgsSChCVQ89YCG0Pdjs36ucyYbgh9Wu38SUEf4+Q== X-Received: by 2002:a05:6214:3d8a:b0:6c5:3123:4efd with SMTP id 6a1803df08f44-6cb3b5b663bmr52445036d6.1.1727431367752; Fri, 27 Sep 2024 03:02:47 -0700 (PDT) Received: from denia.c.googlers.com (76.224.245.35.bc.googleusercontent.com. [35.245.224.76]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45c9f353f08sm6341091cf.94.2024.09.27.03.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 03:02:46 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 27 Sep 2024 10:02:34 +0000 Subject: [PATCH v2 3/3] media: atomisp: Use max() macros 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: quoted-printable Message-Id: <20240927-cocci-6-12-v2-3-1c6ad931959b@chromium.org> References: <20240927-cocci-6-12-v2-0-1c6ad931959b@chromium.org> In-Reply-To: <20240927-cocci-6-12-v2-0-1c6ad931959b@chromium.org> To: Benoit Parrot , Mauro Carvalho Chehab , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Greg Kroah-Hartman , Hans de Goede , Andy Shevchenko , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 The max() macro produce nicer code and also fixes the following cocci errors: drivers/staging/media/atomisp/pci/sh_css_frac.h:40:17-18: WARNING opportuni= ty for max() drivers/staging/media/atomisp/pci/sh_css_frac.h:50:17-18: WARNING opportuni= ty for max() Signed-off-by: Ricardo Ribalda --- drivers/staging/media/atomisp/pci/sh_css_frac.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css_frac.h b/drivers/stag= ing/media/atomisp/pci/sh_css_frac.h index 8ba65161f7a9..3191d2858f59 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_frac.h +++ b/drivers/staging/media/atomisp/pci/sh_css_frac.h @@ -37,7 +37,8 @@ static inline int sDIGIT_FITTING(int v, int a, int b) int fit_shift =3D sFRACTION_BITS_FITTING(a) - b; =20 v >>=3D sSHIFT; - v >>=3D fit_shift > 0 ? fit_shift : 0; + if (fit_shift > 0) + v >>=3D fit_shift; =20 return clamp_t(int, v, sISP_VAL_MIN, sISP_VAL_MAX); } @@ -47,7 +48,8 @@ static inline unsigned int uDIGIT_FITTING(unsigned int v,= int a, int b) int fit_shift =3D uFRACTION_BITS_FITTING(a) - b; =20 v >>=3D uSHIFT; - v >>=3D fit_shift > 0 ? fit_shift : 0; + if (fit_shift > 0) + v >>=3D fit_shift; =20 return clamp_t(unsigned int, v, uISP_VAL_MIN, uISP_VAL_MAX); } --=20 2.46.1.824.gd892dcdcdd-goog