Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp235042lqn; Thu, 11 Apr 2024 22:29:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXHBSO7Sok1Jf+oO7kwLjnJSaSmZcHK1+zS/XfpRpJQQVqK53d9ZDyy22D08fN3cVMWAIiTskZKasOKgpoAZ34W26hsziaXmhGHgP6y6A== X-Google-Smtp-Source: AGHT+IEL+SbEaV/dfXmPzsEQryTqDot9wMpSLMovxI8dUempwPYHDjC0QW44DbfBhk7Lxb/A4NPn X-Received: by 2002:a05:6300:808d:b0:1a7:7306:3677 with SMTP id ap13-20020a056300808d00b001a773063677mr1981697pzc.25.1712899766810; Thu, 11 Apr 2024 22:29:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712899766; cv=pass; d=google.com; s=arc-20160816; b=DmNKYSwFtcR7tkLZzevw04x3LSactzc97UZV72Ih20VcZMBW5gqkNE8bl1rrMd0OtT QNTG7Y9MBtGFfyte+ljvJEIIhYKm53e7X/bogSSq2sZIG9jca7QTQHGyav/b0Tcz0jcu Xv2odYX07oqyo/Q+sB51MFWQil4esfaRp6oEw4EcaOyO64/nNz/N29siqrP152hhS2IU zEfcVklDLZACSlwMIthFkMnK6089yDmvVmqLg//QCBGWzobiB/OKN/y8/A/2AYpvOI1+ y0MmiQQZW8YLALBmwoqnOIS8hK7jaJyTr7ZGJDoxTC9nlDfaTsHdRS35E0fBQUkI5d8p Xa+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pZOmB5Ihq6DCddPj/qaz8z2Ls6VjgoT3L047OnuYEdw=; fh=mehENiMxpY3hOzKd5ODE/hNQNjXofB5S1cM3GfomyCA=; b=Rd+ANh7tcqmAVvmNQWMVrlEJstP/b+LMuqVwiWHN7NWCS+amHysJjDHHwtkP+Mip7z ipdIjOgMOO1BMuxfhQnvFWaJc8dvpBtmVWgWAWp423S+DYDhyliwwTDPtULxsvJkpCpk 5pjAJqu4xUHzoW5HoyYAX/+7lgzBRZkInOXkb/laDuzg/qjjZA7gggUaYzfUR/tRczBD jsS0nVe7k+LCDONkQmh6WFgYSSYhI4NoLdQ9pQdV/v0smpAmNaZ2gXxG7PDPrykfnxOT 1pQ+Se0yjBFL4bUs38xUegDJELFtrY1BDpRcpZKO0eEvcOj6hn1JIZPQrZqppLFN1Np2 7Tyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="JK0N/ubr"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-141981-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j10-20020a170903024a00b001e28eb2a299si2616914plh.482.2024.04.11.22.29.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 22:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141981-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="JK0N/ubr"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-141981-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DB7E6286E2D for ; Fri, 12 Apr 2024 05:29:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 118981B950; Fri, 12 Apr 2024 05:29:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JK0N/ubr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3391E1F934; Fri, 12 Apr 2024 05:29:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712899760; cv=none; b=FHP8lr6S6+y2hhd1hDDbDrQ5+eWzh1M8MBRySkxXOm9y0v7lazI42Zlzm5z0QO3aZGsuT5UbX0u7r8c0g5NX0+NglMWmttymRHNmGckJ2pJHnxb73elWsCpaY2wSIzkku4GZVeEk1iM2e2jbtcqf75qJHd6kkWfnatIIQ/lhsEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712899760; c=relaxed/simple; bh=8bi6ee2KE7tWw9jg23MVgqYOY0sTFVighRqcEyShMDI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kQaOlQY4qmiD8h/DaXuK624M85u5sKl3h19wlNgjkIKnYcHtTOI2oUGAOQWMPLr2D68BWcvgH2RopiAFG2Uo54ctiMFMWnguU7n+3JTBrTW4yIHva4VaHh+AoYrQx4fUYdjF1QTLy96YIXOePGUc1qL5PCNJWNt15O7GJpRIm4I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JK0N/ubr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40DC5C2BD10; Fri, 12 Apr 2024 05:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712899759; bh=8bi6ee2KE7tWw9jg23MVgqYOY0sTFVighRqcEyShMDI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JK0N/ubrIi9OdOk2tmSbS505wxEfErtUdnCRVa9rBz4Vw3z02RncjXTp8P3pfx2Ct pjqzWjahjrwIpelDreVQFYYvgxdbZumuCOODxIT9LwO315sdiTCaUZEWnSf2P5dotC YMTxYV7IAExtWZvt2Y4h6/dRB5C7kI7etlxJ4s3M= Date: Fri, 12 Apr 2024 07:29:16 +0200 From: Greg Kroah-Hartman To: parker@finest.io Cc: Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Parker Newman Subject: Re: [PATCH v2 3/7] serial: exar: add support for config/set single MPIO Message-ID: <2024041213-uncouple-justness-35fa@gregkh> References: <3e671b6c0d11a2d0c292947675ed087eaaa5445e.1712863999.git.pnewman@connecttech.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <3e671b6c0d11a2d0c292947675ed087eaaa5445e.1712863999.git.pnewman@connecttech.com> On Thu, Apr 11, 2024 at 04:25:41PM -0400, parker@finest.io wrote: > +/** > + * exar_mpio_config() - Configure an EXar MPIO as input or output > + * @priv: Device's private structure > + * @mpio_num: MPIO number/offset to configure > + * @output: Configure as output if true, inout if false > + * > + * Configure a single MPIO as an input or output and disable trisate. > + * If configuring as output it is reccomended to set value with > + * exar_mpio_set prior to calling this function to ensure default state. > + * > + * Return: 0 on success, negative error code on failure > + */ > +static int exar_mpio_config(struct exar8250 *priv, > + unsigned int mpio_num, bool output) When you have a bool in a function, every time you read the code you have to go and figure out what that boolean means. Have 2 functions: exar_mpio_config_input() exar_mpio_config_output() and then have THEM call this function with the bool set or not. That way when reading the code you know exactly what is happening. Same with other functions in this patch. Naming is hard, make it easy please. thanks, greg k-h