Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp511080rwe; Fri, 26 Aug 2022 09:01:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR6VQgXonT1qu9jFC0HRE3tuI/nIHG2ymi3a0NxA79B/2aJZyHtTwAP8APy6Cf9MdoBwsZN3 X-Received: by 2002:a17:907:728c:b0:730:c005:5d93 with SMTP id dt12-20020a170907728c00b00730c0055d93mr5982676ejc.265.1661529701719; Fri, 26 Aug 2022 09:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661529701; cv=none; d=google.com; s=arc-20160816; b=WSAfXIZ8nYRSh0YuH1/elHrq+4qWxXY5e8/uV03xgM0iRMCI07XACL87EcVKkzsF33 jam0KVR+qx71s/n9E96ghJL3dVi327Go9rkQiv5j7IOCikWkrk/3YOuXeypyHbcYwaZi KZRokOfhEoQhMsshxKpghQIR9ACjwqlVoAmmh6Jqoj8V7qC9dkhAI5P54D6wTN4Biy+I 7CLwcbZgXYiEwpqy4Y8hw4a9W8iiqgplzmfNPHkcHo7hOymuH1KA2Ijh4DS6hhXvuEpl Vr2ScYOQZ0mYHNSUX30g0vdpslqv8CRhnDZ4TNVa1Lpx/jkmY2Suce9yQYpuE02G4GgW pZ7Q== 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=BBz1rbIuDjVgY8SOEb/J/6vHkLl2zF5hMNhZpHd3Gls=; b=L69kBWs6KkE5Z8pRONKNMzM5qu84hGsyQZhEOqimbNFxSjcv0/WR004qgOQU4cBm8K /YMA/A8hcILKVQwNke2vUxxoQ/Mqu3HiMW84+PQwG0bE1nz4UQVQjKA95USo9K+eeHbC TRzyCdDXk+GMr4L8aBZ5pXpWFGWHDOrrlBSBlaasjXivZxvp/M8E1aO5EEcMhUsD+Q5P VwLJrhvkO7RG968V1+RNOP+KVj539tYNTUnxvJ4sb5tSfWp4/sCGA9VUI84HJiVid8CS 4LAu9rf0oB9Oj+LYHYy9+jVJKqyRQQn1kt07CVmqPVhEiNHRmTZKEnh5343WsnPucDtl 1y3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ALCc7XOj; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a056402430700b004408bac1e2fsi1875944edc.370.2022.08.26.09.01.04; Fri, 26 Aug 2022 09:01:41 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=ALCc7XOj; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344066AbiHZPki (ORCPT + 99 others); Fri, 26 Aug 2022 11:40:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbiHZPkg (ORCPT ); Fri, 26 Aug 2022 11:40:36 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C255222BEF; Fri, 26 Aug 2022 08:40:33 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id g14so1502981qto.11; Fri, 26 Aug 2022 08:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=BBz1rbIuDjVgY8SOEb/J/6vHkLl2zF5hMNhZpHd3Gls=; b=ALCc7XOjkA05G+vfYjzMnu5eL8y8qz31JJlYYVlGOFSCVUEJ3BBCJ5P2ctCu/8LjcL A3lLi0VVXlvI/9CCWoLPRvR5PPchPlEcXxkp9Uxg3XfOHiUjjM7zi+ftUTcTDT/osffN w4G5wzI7cBiuy/dzCmTuOYi7id5WWJ6BQFqPa8YOxUf68vdp0ZKvYZ6e32Tb8vMTK8hG /j6sYwsrLapkunaz/6abVMP8nL+6EHVwNDzcE7d6E7WBowl6mgmdUzLdQIwbyP31jl9j I+NTX1oVXPetj3Srw2Xb8Q96evZG6ixoY/POg0NwmfAW9iqOp63QnifNe5zhkeCOEm8e ymkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=BBz1rbIuDjVgY8SOEb/J/6vHkLl2zF5hMNhZpHd3Gls=; b=Lf9jvTeYQLZaNjwyAmVOOb1kmQUElo4xXN6CD2+qLInc1DGHPyktCLCrSkFqKUh9SG AKrHMx6/XcvrKqgi3dHk9h0TOELnOyDQV0cKXc0fYycDwNuZm/aXwxzkjzzhbxI0+v4g BHjEnr2N5xZG+baNT6bdKNlqvUReOu8yI4xsWRxs4NLGbk7QPJXn3ch0eHbIALmtJoCl uKpUxyGIVKc3k4TNmCWKuo/vA77e4S3qzp+LFxQ+wiC+FrzRo4BW9UVBT3SiUowO25nZ k4Ud9J1KmcGlbgESgpUOHXt/W7UdWkxrRY6f5EGwC/oSub03ocPWcw3D8kOBAWXDDKDP ashQ== X-Gm-Message-State: ACgBeo3jCaHO28LKyTAqaTgtrx6bpdvMKCmGWxOJtt8pv839vjM81PWL FZh6JSeYwPTTD+it+GVZqhCQgaTBhSgA6g/9bk4= X-Received: by 2002:a05:622a:491:b0:344:95bf:8f05 with SMTP id p17-20020a05622a049100b0034495bf8f05mr248386qtx.61.1661528432951; Fri, 26 Aug 2022 08:40:32 -0700 (PDT) MIME-Version: 1.0 References: <20220826144629.11507-1-ilpo.jarvinen@linux.intel.com> <20220826144629.11507-2-ilpo.jarvinen@linux.intel.com> In-Reply-To: <20220826144629.11507-2-ilpo.jarvinen@linux.intel.com> From: Andy Shevchenko Date: Fri, 26 Aug 2022 18:39:57 +0300 Message-ID: Subject: Re: [PATCH 1/3] serial: Rename vars in uart_get_rs485_config() To: =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Cc: Greg Kroah-Hartman , Jiri Slaby , "open list:SERIAL DRIVERS" , Linux Kernel Mailing List , Andy Shevchenko , Lino Sanfilippo 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Fri, Aug 26, 2022 at 5:50 PM Ilpo J=C3=A4rvinen wrote: > > Make variable names to match uart_set_rs485_config() ones: > - rs485 -> rs485_user > - aux -> rs485 Reviewed-by: Andy Shevchenko (see below) > Signed-off-by: Ilpo J=C3=A4rvinen > --- > drivers/tty/serial/serial_core.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial= _core.c > index 12c87cd201a7..9c1bf36b7a93 100644 > --- a/drivers/tty/serial/serial_core.c > +++ b/drivers/tty/serial/serial_core.c > @@ -1408,16 +1408,16 @@ int uart_rs485_config(struct uart_port *port) > EXPORT_SYMBOL_GPL(uart_rs485_config); > > static int uart_get_rs485_config(struct uart_port *port, > - struct serial_rs485 __user *rs485) > + struct serial_rs485 __user *rs485_user) > { > unsigned long flags; > - struct serial_rs485 aux; > + struct serial_rs485 rs485; At the same time you may order it by "the longest line first". > spin_lock_irqsave(&port->lock, flags); > - aux =3D port->rs485; > + rs485 =3D port->rs485; > spin_unlock_irqrestore(&port->lock, flags); > > - if (copy_to_user(rs485, &aux, sizeof(aux))) > + if (copy_to_user(rs485_user, &rs485, sizeof(rs485))) > return -EFAULT; > > return 0; --=20 With Best Regards, Andy Shevchenko