From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD99C6FA82 for ; Fri, 23 Sep 2022 04:43:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229612AbiIWEnF (ORCPT ); Fri, 23 Sep 2022 00:43:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiIWEnE (ORCPT ); Fri, 23 Sep 2022 00:43:04 -0400 Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [IPv6:2a01:4f8:150:2161:1:b009:f23e:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3243D12476E for ; Thu, 22 Sep 2022 21:43:02 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 20CDC100DCECA; Fri, 23 Sep 2022 06:42:59 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id DBB9F50D4C; Fri, 23 Sep 2022 06:42:58 +0200 (CEST) Date: Fri, 23 Sep 2022 06:42:58 +0200 From: Lukas Wunner To: Mark Brown Cc: Yang Yingliang , linux-spi@vger.kernel.org Subject: Re: [PATCH -next 0/6] spi: Switch to use devm_spi_alloc_master() in some drivers Message-ID: <20220923044258.GA28079@wunner.de> References: <20220920134819.2981033-1-yangyingliang@huawei.com> <19da3b7e-121b-90be-7631-cdfcf8327140@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Wed, Sep 21, 2022 at 01:37:49PM +0100, Mark Brown wrote: > On Wed, Sep 21, 2022 at 10:02:25AM +0800, Yang Yingliang wrote: > > On 2022/9/21 2:33, Mark Brown wrote: > > > If we're switching please update to the modern naming and use > > > "controller" rather than the old name. > > > Do you mean to use spi_controller instead of spi_master? Something like > > this: > > 'struct spi_controller * ctlr = devm_spi_alloc_master();' > > Or just use devm_spi_alloc_controller() directly. There's no such thing. The driver needs to explicitly allocate a master or slave and that will result in the slave bit being set correctly in struct spi_controller. Yang's v2 series now calls __devm_spi_alloc_controller() but drivers should never call that directly. Thanks, Lukas