Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1498959pxm; Thu, 24 Feb 2022 04:30:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvOouQviioP8c3VTm9lwa6p1iNyTLBxvhA+Qlm2ta9Tc/az+/VHO/xV1G0EXesx1FGPHr3 X-Received: by 2002:a17:906:278f:b0:6d0:432:2bbb with SMTP id j15-20020a170906278f00b006d004322bbbmr2132858ejc.160.1645705805549; Thu, 24 Feb 2022 04:30:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645705805; cv=none; d=google.com; s=arc-20160816; b=O7SbNIC7zt8YCJIubbR7Y/O0p/5rtizyn/VVl0yR4sy2JPWJ1gZS4FTpDuDH7uciJ+ g+KTfr/1AIfqrGPguw/7OCnK/jxRphWxp3FHAlz396I8bIDbsyoeclj5eZTME/PqRE8u XDObn5o/gUDTFopax3NDZ8UjcgI7SPZF4YfExDSG9/MrPQHIW9n4MVwCLSNhdEfEr4FN Ox36OLlN1re7DY+BxaIicikxltPI6EJa0QkcwgVRGWYf0SwGyAQWwlJyXNhG5JMc0GoF sGspnYr7wPAxaX1X08B6NJXK/GHNMm/JzYRwjOSvZlL0nQLjkz3iF5k9w3BfhGmVMeHD gQ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=La9xL/VSFQVnbxlZtbRYv+Me+Sg+a5CCWTaQP4xEWq8=; b=WGO13UDghx9tyYCziofgpYnjnOYXQssyb+FU/20zucX5ZuRgbYtELSf0E2VeIqbnx0 9i0vTjDFIZsDP6BmyZqHVX5W78lclqGbSL3s38LWrVK3X/ewJv+RgenQ0b2+jLSH+cfe B30Lkabciq+9s1U+9myzkZfUeVAFkI6UVO/ib5zRjrJGuuKhi1O70uL/VHpq/3vzwSPR +EcS642gBrUMmAPg7KGcWRt6+EAMCBk13yws8m2RyQVRyVIR1WvKoYOvgQoobo4xGKrW 1EX68/tvbHQLhSvzw8kL8e2nmI1GcJFZqG2Tmfv1DyP3e3LKMJ5ahbapzm+xOmWZkjp2 sPTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jRzeWfMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gg19si1371960ejb.443.2022.02.24.04.29.42; Thu, 24 Feb 2022 04:30:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jRzeWfMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232947AbiBXKLC (ORCPT + 99 others); Thu, 24 Feb 2022 05:11:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231709AbiBXKLB (ORCPT ); Thu, 24 Feb 2022 05:11:01 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C531F28ADAA; Thu, 24 Feb 2022 02:10:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 29E4BCE1E45; Thu, 24 Feb 2022 10:10:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D42F9C340E9; Thu, 24 Feb 2022 10:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645697428; bh=Rbl59oRX72XEvYwduAiG46oni5FfUh7CH/lIFzuSQmI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jRzeWfMj4/o4gepA6Rbve+jREISZVsplcM6NNL1j56HPyR/Je377tGbtpHYiCJzKn MhgOuos+08MmdaipiV2aSLbFjxwnz49A2SEbz2ODZGY1XxnW6Dl34ACwTLBS0Funbq n1/MVO0MlY1L7qshvBmVoUnyrOJ3wLNDlAiRVEiE= Date: Thu, 24 Feb 2022 11:10:20 +0100 From: Greg KH To: Jiri Slaby Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] tty: serial: define UART_LCR_WLEN() macro Message-ID: References: <20220224095517.30872-1-jslaby@suse.cz> <20220224095558.30929-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220224095558.30929-1-jslaby@suse.cz> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, Feb 24, 2022 at 10:55:54AM +0100, Jiri Slaby wrote: > Define a generic UART_LCR_WLEN() macro with a size argument. It can be > used to encode byte size into an LCR value. Therefore we can use it to > simplify the drivers using tty_get_char_size() in the next patches. > > Signed-off-by: Jiri Slaby > --- > include/uapi/linux/serial_reg.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h > index f51bc8f36813..c9d5ff6dd4c6 100644 > --- a/include/uapi/linux/serial_reg.h > +++ b/include/uapi/linux/serial_reg.h > @@ -111,6 +111,7 @@ > #define UART_LCR_WLEN6 0x01 /* Wordlength: 6 bits */ > #define UART_LCR_WLEN7 0x02 /* Wordlength: 7 bits */ > #define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */ > +#define UART_LCR_WLEN(x) ((x) - 5) I'm all for this, but why does it need to be in a uapi .h file? thanks, greg k-h