Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3692854rdh; Tue, 28 Nov 2023 00:48:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+to3uYDdwFwSHdWFQODxHMjGD29jRUtYED+UkNXN2LU9eGY8PpbWmYdnAcbPkHjvcc2nm X-Received: by 2002:a17:902:c60b:b0:1cf:5746:7ad0 with SMTP id r11-20020a170902c60b00b001cf57467ad0mr19586494plr.14.1701161286696; Tue, 28 Nov 2023 00:48:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701161286; cv=none; d=google.com; s=arc-20160816; b=Zo+5P9Bli3CJMFhQo1t8pZ7bpEAGoDqfl8malC8TTj+H5ETfvzGNOI2f4Q9thBfwKu XNZqYHWr6ew7AkEYdn0VaCIKCErjLJxCG+t1hPnxi8sPjPr03QcIv9h6lGvqE4t1yQ7I aURDH8hAZzvcgPbvy/B16YB8yM5re6IQMBhLvlPaFzOhvo5PZ5Zx4q2tbPtfWlRblShr hSJs3hdCne2tSXXfCDv3ojQHqeetMrEgITEkFPXLrAmeOd3Lf/O07ZlbzGHgnw5ZMtCt quEmGBppnxnv0WiYxsqKZtU/YoTBlWIWkJc87BITo9vrSPRDqa9KKIz+0oDhIRUCdu24 TtaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=B/FGvUrY1T+u4h3eD8cuv8IgBGuuyis0jyMyILTG5Cs=; fh=xkO5kG2oksy2aaEe0jh/ZK6kL8K5rbRB+hGI6NFv0sk=; b=tguqdVcJPpHN6FsqWAetgqZn8zosRnKwtj6/cOz9ksTYjOkcbVrblbMzMcHqwvigRV qnJijsh/swJ3Ts8JOE5oFc7g1C4lYzoUYNsQEuJzr7T1KaqMNFH6pClmgFuDhx66lHgk Ex8BzwgDQyhBfu2+YdbEgavNCtcqOwZrYLWBZjKewFo2MA4U/FGToT1QEiS2AjhZ79NZ 8HuACQ0UfDwXaO5hbqeMvED0QJjtCkMdd0z34cnaVnCBdyOVp6ubXu0yq4PJxpwSMOmJ 6z/cZg/VhkXRGde4Cq+kejMS5BjT7R3JCfgvtLsOb09A+UtL4+BYhSUAbGMX32dLAnBl J9Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=omIgNta8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id l3-20020a63ba43000000b005bd366fd5a1si11574669pgu.449.2023.11.28.00.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 00:48:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=omIgNta8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3073A8074CEF; Tue, 28 Nov 2023 00:48:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344236AbjK1Irs (ORCPT + 99 others); Tue, 28 Nov 2023 03:47:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234770AbjK1Ire (ORCPT ); Tue, 28 Nov 2023 03:47:34 -0500 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A1AF1BB for ; Tue, 28 Nov 2023 00:47:30 -0800 (PST) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id E2CF36E; Tue, 28 Nov 2023 09:47:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1701161249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B/FGvUrY1T+u4h3eD8cuv8IgBGuuyis0jyMyILTG5Cs=; b=omIgNta8GaYBjwrBX8v6awEENxnGYsQM/8IyIay2A7m4msZtcUozD/UUm49ThMV/vAZkci LC7XPI+nffCV4X4RH5dIgY9pXwuLSsV4w/N6kZ/KXp7voyAmZlzKVlvcA62h7f3THJU1hJ 898RUgUrd3gLjvBoHdPfFptncr3yIGMXYmhwv57RmcgopcQ6k5cPMvUUhPlMGY+31LYCyN 3CNHdOzUSlA4fVkKqS1wsLiN1ix91UnCe3DoqVOt4VJyxoY/KCpVPFmhRrQIvKNQlWeyrh H/5umPg9aIPG1sZuFX2BHGI0fm+ol8eb5dxzgVzPKkdIQXkd3R6eZ8XhUGJoAw== MIME-Version: 1.0 Date: Tue, 28 Nov 2023 09:47:28 +0100 From: Michael Walle To: Tudor Ambarus Cc: miquel.raynal@bootlin.com, jaimeliao.tw@gmail.com, jaimeliao@mxic.com.tw, pratyush@kernel.org, richard@nod.at, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: spi-nor: stop printing superfluous debug info In-Reply-To: <20231127165908.1734951-1-tudor.ambarus@linaro.org> References: <20231127165908.1734951-1-tudor.ambarus@linaro.org> Message-ID: <42c96d63d1ea4f7e8f16a3c8eb0a4cf1@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 28 Nov 2023 00:48:04 -0800 (PST) Hi, > The mtd data can be obtain with the mtd ioctls and the SPI NOR > flash name can be determined interrogating the sysfs entries. > Stop polluting the kernel log. > > Signed-off-by: Tudor Ambarus > > --- > drivers/mtd/spi-nor/core.c | 19 ------------------- > 1 file changed, 19 deletions(-) > > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c > index 25a64c65717d..6de76fd009d1 100644 > --- a/drivers/mtd/spi-nor/core.c > +++ b/drivers/mtd/spi-nor/core.c > @@ -3517,25 +3517,6 @@ int spi_nor_scan(struct spi_nor *nor, const char > *name, > /* No mtd_info fields should be used up to this point. */ > spi_nor_set_mtd_info(nor); > > - dev_info(dev, "%s (%lld Kbytes)\n", info->name, > - (long long)mtd->size >> 10); I'd lower this to dev_dbg() and print the jedec id. It might come in handy for a quick glance during bootup if debug is enabled. > - > - dev_dbg(dev, > - "mtd .name = %s, .size = 0x%llx (%lldMiB), " > - ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", > - mtd->name, (long long)mtd->size, (long long)(mtd->size >> 20), > - mtd->erasesize, mtd->erasesize / 1024, mtd->numeraseregions); > - > - if (mtd->numeraseregions) > - for (i = 0; i < mtd->numeraseregions; i++) > - dev_dbg(dev, > - "mtd.eraseregions[%d] = { .offset = 0x%llx, " > - ".erasesize = 0x%.8x (%uKiB), " > - ".numblocks = %d }\n", > - i, (long long)mtd->eraseregions[i].offset, > - mtd->eraseregions[i].erasesize, > - mtd->eraseregions[i].erasesize / 1024, > - mtd->eraseregions[i].numblocks); > return 0; Part of this is already available through the spi-nor debugfs, although not the actual mtd properties. These I think, should go into the mtdcore itself if really needed. Either through dev_dbg() or debugfs. -michael