Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp448275rdh; Thu, 26 Oct 2023 06:46:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdXLkvdCKxO9VcxJbXrVbn0fkja2WNYyOrdnSwZ+s3r8ikdPWQwUZHbyvHD6WNepcXf7d5 X-Received: by 2002:a05:6808:2105:b0:3af:8050:369f with SMTP id r5-20020a056808210500b003af8050369fmr23067417oiw.6.1698328001093; Thu, 26 Oct 2023 06:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698328001; cv=none; d=google.com; s=arc-20160816; b=hA0n75HMLkL9JnrJJgyAOctyfhL/RRJnSbRxLq8MD26DX81XT8k5u6z1zrEHkXvtFs lsxy2DCKnMvS1jd8eMEMxl0+6BCCTpVUaXxcB41sAY3jTLe41G4HTkHb0UpW0wNasy2T kBh6duOyGho9+ekEP7i6XamQe9UGGLLnRb5sJ+V4XowKFmqSDg4CL+06LjD4DMKzYfLm iZln4m1ZM50cY5GpYf6iPx0vjz+kOXmilJo6px/7heucPnKYJdgv5rXjnq8O7HF57GpL arnxljikdGF4ufEOqVeVMMVYoQPjuvbzv/oZsHQkwipu+VmuVKwb8l5aL3JA83S0Yupv eFuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EdyVVw0aBVMHPJpP77t0JsBJNKlhvsWo73t+NTi0GM8=; fh=WC25YkHVXFyFZGLDpSec/k1npyxIOZp/onocOUfguWQ=; b=Y6KXJKhQy9SSv9A6et389ix4+XeVpvKdZv6FLxArXduTX6dx01kT6G9/yH9BW9sEtX cvuecnNpihJZ2CX6nyGc8cuO7/8FBAxE7FGxkNmpPfhGaYU6OP6bbNYHizHFPyva16Lk wPRfWTkanvXHtIn257E+f8n4NRP2TI4JmWu9OvP/CmjOf7JTe5BhGS28kVUXsz0tJmTc aVkpaxpbh6rwK88904DiGc3xNhAIqkNEiacHlqkHuOXEHbvgdajhmL0AxY1cI1NJ5vVm J8UbHKBwCN9jK99/9y5CERgjygxcJquduyhK+temIsli1gaBcBLdQCrHtJ6Hag2ldSCm K0eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zSCLn1Xx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m7-20020a252607000000b00da066698609si6074592ybm.241.2023.10.26.06.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 06:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zSCLn1Xx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9F57A821ADA0; Thu, 26 Oct 2023 06:46:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbjJZNqf (ORCPT + 99 others); Thu, 26 Oct 2023 09:46:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230507AbjJZNqd (ORCPT ); Thu, 26 Oct 2023 09:46:33 -0400 Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C667187 for ; Thu, 26 Oct 2023 06:46:30 -0700 (PDT) Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-1ea05b3f228so519095fac.1 for ; Thu, 26 Oct 2023 06:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698327989; x=1698932789; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EdyVVw0aBVMHPJpP77t0JsBJNKlhvsWo73t+NTi0GM8=; b=zSCLn1Xx3oirlDQLkV2dktoqiTTgCLUIjAUgiWgiQx36E6M67EdgwqaKpP7woCRjAh +piQKOs89247vNn960XRCU5hNc96TSfqzJXAh2HkU2cLdypASINfZPVqq+7xL/6a3nsb 47mpF+gK2kGXVktz/gS6kOopKcwn1L7iDPlU8lERtUF0z6evcATShynlw6K2NTmjnqb6 J3jugKPopMNl5oAO5vlNmrO4w/ZgTl1vaBWL6wNDtuyQE9yz7/0FfN1JEQUjj3KfOeK8 gTdNXefDkH76n5ax50NUM2jEDb+UcA61ogFp1p0VxMRRzbjvFVKEKsuOW4Nt0vXqcez1 ZUIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698327989; x=1698932789; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EdyVVw0aBVMHPJpP77t0JsBJNKlhvsWo73t+NTi0GM8=; b=wT9Hx75fQ5ulQrlTbGZLYnqQWZMFKejqyFpu0kuDsbYHjTh1U6Bdn59m15e19wZlq3 TNaL1oLUCkLT7l5Ar0iC1l4hBtqoK+jVEO6ySujz88wajEUjCMVeyFl12LeBQhDrMfmW Es/+S5sbovpy6cebqRFKRh27yBvPUaTsqhdBAxqkwmRBeqKr1H0TEyp31Ny8A9WzQN42 r2LVrhpBxFrmQtLf2+10IaCF2VuuYjSRlcJp0dNYiS9/NYrI9pLhPgusSHq9x0L4g7t2 9I85qiWj1ncyxxQP8l43JFGY9rC947S0i8Zgxgf/cFhXAyhlqQiooscP2ssE/J/iNGJe 8OBw== X-Gm-Message-State: AOJu0YyXWcG7NJD9AvRZIjeLC8HCxV4v23PCXog6zC7Uv09A3CucQE2D zzEQ0TUFMh8MAuNN1Tx9XKTc6ykOhj1lJHVUDSSqPA== X-Received: by 2002:a05:6870:7a1b:b0:1e9:f0be:cbbe with SMTP id hf27-20020a0568707a1b00b001e9f0becbbemr24209376oab.9.1698327989467; Thu, 26 Oct 2023 06:46:29 -0700 (PDT) MIME-Version: 1.0 References: <20231026-mbly-uart-v1-0-9258eea297d3@bootlin.com> <20231026-mbly-uart-v1-4-9258eea297d3@bootlin.com> In-Reply-To: <20231026-mbly-uart-v1-4-9258eea297d3@bootlin.com> From: Linus Walleij Date: Thu, 26 Oct 2023 15:46:18 +0200 Message-ID: Subject: Re: [PATCH 4/6] tty: serial: amba-pl011: replace TIOCMBIT macros by static functions To: =?UTF-8?B?VGjDqW8gTGVicnVu?= Cc: Russell King , Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Gregory CLEMENT , Alexandre Belloni , Thomas Petazzoni , Vladimir Kondratiev , Tawfik Bayouk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 06:46:39 -0700 (PDT) On Thu, Oct 26, 2023 at 12:41=E2=80=AFPM Th=C3=A9o Lebrun wrote: > The driver uses two TIOCMBIT macros inside pl011_{get,set}_mctrl to > simplify the logic. Those look scary to checkpatch because they contain > ifs without do-while loops. > > Avoid the macros by creating small equivalent static functions; that > lets the compiler do its type checking & avoids checkpatch errors. > > For the second instance __assign_bit is not usable because it deals with > unsigned long pointers whereas we have an unsigned int in > pl011_set_mctrl. > > Signed-off-by: Th=C3=A9o Lebrun The kernel looks better after this patch than before, so: Reviewed-by: Linus Walleij Since the eternal defines uses masks rather than bits we can't use __set_bit() & friends in this case and that's life. Yours, Linus Walleij