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 X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5348C10DCE for ; Fri, 13 Mar 2020 06:05:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8AC3E2072C for ; Fri, 13 Mar 2020 06:05:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="mfUBslo5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbgCMGF5 (ORCPT ); Fri, 13 Mar 2020 02:05:57 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:40522 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgCMGF5 (ORCPT ); Fri, 13 Mar 2020 02:05:57 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02D64RVG082531; Fri, 13 Mar 2020 01:04:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1584079467; bh=vV1m4ipHbEcjDNG4CCj7hTEXa79TbXMFs2L4A48lc2U=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=mfUBslo5TSJh2eSnf7KSk/FglJiy/UUACwvkd1PZehbMiBP+SOdDjllPmHp1iD5tP GciZb4L06sqC+4DD9ETAwsh/vQ10LqQz588dN6F0swFU3xbxfi8ndvonzVAj61Z26w fkZcaWe52pGoASlkjY9TtE9yyO6oFiQWQY8cAI6s= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02D64RHi005130 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 13 Mar 2020 01:04:27 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 13 Mar 2020 01:04:27 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 13 Mar 2020 01:04:27 -0500 Received: from [172.24.145.136] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 02D64Gxu117651; Fri, 13 Mar 2020 01:04:18 -0500 Subject: Re: [PATCH 01/23] mtd: spi-nor: Stop prefixing generic functions with a manufacturer name To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20200302180730.1886678-1-tudor.ambarus@microchip.com> <20200302180730.1886678-2-tudor.ambarus@microchip.com> From: Vignesh Raghavendra Message-ID: <91394111-cbd6-c24e-485d-88fcd6825dc7@ti.com> Date: Fri, 13 Mar 2020 11:34:55 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200302180730.1886678-2-tudor.ambarus@microchip.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/03/20 11:37 pm, Tudor.Ambarus@microchip.com wrote: > From: Boris Brezillon > > Replace the manufacturer prefix by something describing more precisely > what those functions do. > > Signed-off-by: Boris Brezillon > [tudor.ambarus@microchip.com: prepend spi_nor_ to all modified methods.] > Signed-off-by: Tudor Ambarus > --- > drivers/mtd/spi-nor/spi-nor.c | 88 ++++++++++++++++++----------------- > 1 file changed, 45 insertions(+), 43 deletions(-) > > diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c > index caf0c109cca0..b15e262765e1 100644 > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > @@ -568,14 +568,15 @@ static int spi_nor_read_cr(struct spi_nor *nor, u8 *cr) > } > > /** > - * macronix_set_4byte() - Set 4-byte address mode for Macronix flashes. > + * spi_nor_en4_ex4_set_4byte() - Enter/Exit 4-byte mode for Macronix like > + * flashes. > * @nor: pointer to 'struct spi_nor'. > * @enable: true to enter the 4-byte address mode, false to exit the 4-byte > * address mode. > * > * Return: 0 on success, -errno otherwise. > */ > -static int macronix_set_4byte(struct spi_nor *nor, bool enable) > +static int spi_nor_en4_ex4_set_4byte(struct spi_nor *nor, bool enable) Sounds a bit weird, how about simplifying this to: spi_nor_set_4byte_addr_mode() Or if you want to be specific: spi_nor_en_ex_4byte_addr_mode() > { > int ret; > > @@ -604,14 +605,15 @@ static int macronix_set_4byte(struct spi_nor *nor, bool enable) > } > > /** > - * st_micron_set_4byte() - Set 4-byte address mode for ST and Micron flashes. > + * spi_nor_en4_ex4_wen_set_4byte() - Set 4-byte address mode for ST and Micron > + * flashes. > * @nor: pointer to 'struct spi_nor'. > * @enable: true to enter the 4-byte address mode, false to exit the 4-byte > * address mode. > * > * Return: 0 on success, -errno otherwise. > */ > -static int st_micron_set_4byte(struct spi_nor *nor, bool enable) > +static int spi_nor_en4_ex4_wen_set_4byte(struct spi_nor *nor, bool enable) Unrelated to this patch itself, but can we just have one set_4byte variant that uses WREN and drop the other one? I expect sending WREN should be harmless even for cmds that don't expect one. Rest looks good to me. Reviewed-by: Vignesh Raghavendra -- Regards Vignesh