Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2060567iog; Sun, 26 Jun 2022 05:47:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1udWnR/MU39J2KmpvBvtJN2p6eR3QKtdYVLdYuJ11xSIwc5qZU45XYD4XinxmP0D2MKNfaI X-Received: by 2002:a17:90b:1d09:b0:1ec:bb51:9396 with SMTP id on9-20020a17090b1d0900b001ecbb519396mr15235034pjb.192.1656247678498; Sun, 26 Jun 2022 05:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656247678; cv=none; d=google.com; s=arc-20160816; b=ubYR4QMdE7uo636GLbHdOKJOyaJ8qoijQEvA/s+kTAT3md8wEyfU1TW55GyXpz29Jj EkR5A6FsN2IqnP4tQmVJzen91lkUqJI5MYgbA0g3kduR1H/og4lS3u3T3LFEe1UludY/ G/1MpS5k6hY5av157pFpvJ68jY1iwrp1Wbojc5vY/hDHZr5uybV+INdVMsIvBBbI390l mYsOa3IOeIyyJmFwtv2vCU2Wkte9TRdjgclkLGdnFDFjtToQhCZ5Eydg/T+hNy4t5Gur QN1/PbfeU6nyYbr73D3jRkKphFBJMyQkrShlGk40gyfG72OKKG5sdP9Zt3ISiUmaAS8s L1Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=9AW1nedd9b+r3ZLs4ehQebhtxMvJJn4bCViG7Wuc3KM=; b=sj8f6/xxwX1evWphJMlMbMw85+9JSzNNp3PcByMaTymoEfR18BR43sCWguucbTrUlL 7DyzOc3eHw6u5uVgxD4gRgNwUDhirpdzHjzT53XC14n3a9XorG+tbul4F2uCzs7x0CR2 MQCuhOTG+M3HwdcCBQkaUF8bXiXol0NTVcvAliTfoXSD1OtE9e4/hiDHqNvwzx9yUZHX 1+2IMrFfG5TnvgLaRqNaFrDPU7Sr4gZL85I9s4AmjWMBMLBDalfD9zvE88PPxQgwuFx8 JWrb02TQ2I9cEnUKqjf9tFFosAoEgqos5Ae+P4UAxi8642DSGv/PQko2oZyr5yg4SpX2 XRhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=kswUMhET; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a656c12000000b0040ce4de349csi11446061pgu.291.2022.06.26.05.47.47; Sun, 26 Jun 2022 05:47:58 -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=@gmx.net header.s=badeba3b8450 header.b=kswUMhET; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234401AbiFZMhZ (ORCPT + 99 others); Sun, 26 Jun 2022 08:37:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbiFZMhY (ORCPT ); Sun, 26 Jun 2022 08:37:24 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4BC5CE12; Sun, 26 Jun 2022 05:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656247014; bh=Hbtbw9jJgitYi4Z1i1+4yr+MTM8CnSIbUaYa7C0VFDY=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=kswUMhETBFK56Q0XxSikt3etbjm1mDVeRvzvFtdSeO5Napul4RZfuHgWZ6GI/Djse 3eo9t0eDmH7IHUIjjEBOxhbfvW0jkhyUYreAvD2NVL2H19IcnqDAEAGgoFbxs6fEyr FNwQX9bQ9mM04EkHSDDw61NgYSeTmIKRz6nycvTE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.0.33] ([46.223.2.248]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MhlKy-1nRxtW386K-00dkI7; Sun, 26 Jun 2022 14:36:54 +0200 Subject: Re: [PATCH 01/36] serial: Add uart_rs485_config() To: Lukas Wunner , =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= Cc: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, Andy Shevchenko References: <20220606100433.13793-1-ilpo.jarvinen@linux.intel.com> <20220606100433.13793-2-ilpo.jarvinen@linux.intel.com> <20220625201912.GA29720@wunner.de> From: Lino Sanfilippo Message-ID: <918ab6d2-c0f8-fd74-8e80-36d86ba82255@gmx.de> Date: Sun, 26 Jun 2022 14:36:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20220625201912.GA29720@wunner.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:K5Dksg2RaK0LqBDn1SNu1Z+t7gV3IiwFu9erKwyTmoohPcUepHY Y/qgDB1NZpObVLEXvW+Kj7dyurIZHwEkMZW4eLhf0di4a8xFCe5aF5tl2+ISKKUFDmx8epA N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M6hJSRBTNbDbcLhXuHfkYaK0IAn911s0TQ F9JtpD5rE4qTYIOabZX6FHMj47POmFoR+iZ4fzahZGxuQjbmwCUq3oVniSh44bBSb1lk8ZfGa YnympI5ZnG/jeTF28YaRFxMV2u3fDXUzpDQhj1t48OKrlLWbt8U6fshBXKl1fRyTmiYeQjNjf 8EP1bnW/dURpdvUGDd1/o46VFjHc9oRgsqz1qhtEO1QOwhuJvjtOY4y7A== X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 25.06.22 at 22:19, Lukas Wunner wrote: > > Why doesn't this helper acquire the port spinlock, unlike > uart_set_rs485_config()? Is this safe? Do all callers hold the lock? > Do we need an assertion to verify the lock is held? > AFAIU the callers are using this only during initialization, so there is n= othing else at this time that accesses the serial_rs485 struct and thus no need for lo= cking. Regards, Lino