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 EB3C5EC873E for ; Thu, 7 Sep 2023 16:16:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238302AbjIGQQr (ORCPT ); Thu, 7 Sep 2023 12:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235597AbjIGQQS (ORCPT ); Thu, 7 Sep 2023 12:16:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14501FE7 for ; Thu, 7 Sep 2023 09:15:13 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CCE8C433CC; Thu, 7 Sep 2023 06:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694069734; bh=mjcPEuc/gz0ex7VoEhNdmXz/LJ1yG2hyB4GVOCktz/w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Of4n82yUjLpH0jr9GO+SkTaPM7UepX+lFfRpXy3ptxIL1iU+qS67KTyqOjHhgWyQS Gg4GWfztbuDocJ6yV1JBWphktEYR0DsdGrw0+/UWuIPVzLQSc0P/1bcYofAvpW2b28 +C+A09bBFmNvfZy6N+SACzkykc7LSUYx5sFiJ0TgeuAHb/UN2PCWYndkK6jvIBo5cm mIyGk7j6uj6PB4YuPO6hoZ2R6LLfuX2ebGhNgQZ6CvdItCLjjt99MrhYXWeIqrzf6t OCgwfuuiQDUDaxJZhlXIcq/09cfyrCLRxJOKjgVxqbSA0Eqi8NQbPAIl8okGViXj4d OiVBbyOkwnC6Q== MIME-Version: 1.0 Date: Thu, 07 Sep 2023 08:55:31 +0200 From: Michael Walle To: Tudor Ambarus Cc: Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v2 11/41] mtd: spi-nor: drop .parse_sfdp In-Reply-To: <530942be-4175-43d5-a111-c433be7eff72@linaro.org> References: <20230807-mtd-flash-info-db-rework-v2-0-291a0f39f8d8@kernel.org> <20230807-mtd-flash-info-db-rework-v2-11-291a0f39f8d8@kernel.org> <530942be-4175-43d5-a111-c433be7eff72@linaro.org> Message-ID: X-Sender: mwalle@kernel.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > the condition looks broken. the method returns bool, but here you > return > size_t probably. And when size is zero one shall parse sfdp, not the > other way around. > > maybe return (nor->info->size == 0)? Yeah, good catch. -michael