Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6682699iob; Wed, 11 May 2022 03:05:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ+ECScpNRk8iwPpYLhhjTj1yjvMSF5WmToXJ8/gjWbZL2bHf5KEj3Dfgrnmu7Lz64JQXt X-Received: by 2002:a05:6402:1cc1:b0:413:2b12:fc49 with SMTP id ds1-20020a0564021cc100b004132b12fc49mr27523327edb.118.1652263538479; Wed, 11 May 2022 03:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652263538; cv=none; d=google.com; s=arc-20160816; b=RaOdP2++HbJwow9bRB1rKiVh16xXneRePFilddhjVYKb2MfnTSp+3lzy6EZmWB4+ka WQIqVROFpcVveIquqnXFZtosndF/j+GPzn+MDXg1gtv3mZSeQfDxQrIF0X5wVywfXxM4 s4RBeoB7IbycuX+czmeyC7h/0z0U/gFL+Pzf7RcUms/uvKOxV6Fp3FfIJOZueHemED7U 96M1ZQnLd3+oAwjvA1VpA7M1IEaHY+4j0SZTX1KrDa9EnUtD3VnTfkp7+lvZVNwAYJuD 5+RlE8M4LslKTlBz+Xj5y6BQLrJimiNkV9G4mZipvku0YcBP/AL5p69QH1XzL1Gyf5S+ fSKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jK23TSWrd5T+xFmke6tHapRqyW15z312qhwW+MUc3c4=; b=OivHHI66qeFpS040tgubNkSB24uOh2b+xGshvZQC3MXpy6Gt2mrkb0tz+cxfOtle1/ WEIKBN5HETolo9WohVdbsE3gx6xmpeVc6Dsz6hxrJ33BYkdgY1oqH5fBogeeI7e83iIt eFRJRsBfKf/d3sZNeRhc7/inVvNc9VwpmGk8H4KScvG43YI+RkNyKAIGifqrT2yNkYWl ge0RPTHod/rQJaJcXJAMnkdxtMb9zqyLX7JtdGqltKjq58jSONmrdIvrtDNi51TimmsS Sa24W0TQJQ9c8iLb1a9Z6JCizPQtKrrKVCc84N94CdbbNkwiG0OiNO7zUu5SQLzbKGqX 9OYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gJlbBY6z; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m15-20020a056402510f00b00426012b9e58si1992844edd.362.2022.05.11.03.05.11; Wed, 11 May 2022 03:05:38 -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=@gmail.com header.s=20210112 header.b=gJlbBY6z; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231604AbiEKJEX (ORCPT + 99 others); Wed, 11 May 2022 05:04:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbiEKJEP (ORCPT ); Wed, 11 May 2022 05:04:15 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62F7033EB7 for ; Wed, 11 May 2022 02:04:14 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id v65so1930891oig.10 for ; Wed, 11 May 2022 02:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jK23TSWrd5T+xFmke6tHapRqyW15z312qhwW+MUc3c4=; b=gJlbBY6zHgkKcHFOdXBhecGt1utSUi1KDZrGwDY3NWUT34P1dlpZ1GaQRfUMCECNJj 6R/r4jSTyBIeZtlUnoUIX4VE69yTnkp4ZoQPL/ZWjigYdoQPmGcAQgVV6jP4eMiJxuJ3 3jiEwcAXlcjpQpTXWXwe8MmRi9jE8ppJBDxwGNf8fyRZCCtaWxcBu2pTthvQFDcz+dro ONt9zZefAe7QTS6FwUvJkBQ039YAnjOgxyijc5ARSbx/nC5r/pUH6gkBfYJ1iGhmXE34 GHtl98uO08M96p11DDhfUf+0GhNNCV4C47x0sLvSJwXq6U28hsxrKvZxSkpURLwNREao tOpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jK23TSWrd5T+xFmke6tHapRqyW15z312qhwW+MUc3c4=; b=1KAo5x4yJr7WFPqU5rVKjMmjVXZx1WedXmOu9wC15DX+HldW5WoiDLj9hl47gRvxcJ K95OsKcO4+E2x3wzyqagAewb8tQDoKZFeQ9wlvRG6LhuPAz75aLguVnsDKZFUW5RWbEU DhXYxdNf/SydZgXYMVWayZcBg7qRzBWIbLcpMJfmvqgccsFhEMvdRiau5f68cNfB8tbA Rw7rCIT5VCynXidhdZLQn8/ka1l3acF7EAWTEGcTuuwzlUOonQFHXE9N2a4PGJRhMv8U azUQ9rRV/QCWSoA747xfvOrT3QIsqYa4VurLhCTW9JhZ3BTkUIypO6+YVCpGAJp2ZVSc ALlg== X-Gm-Message-State: AOAM531xcYtWS4jWA0YjoZEKgLi0l3w7ZO7ucJKxhEusHkglM3oVOhKs 6qdR8ObWeqxxAWqG4CBvrBw6kVRhFNf6mV9jAFo= X-Received: by 2002:a05:6808:1202:b0:2f9:c7b4:fd56 with SMTP id a2-20020a056808120200b002f9c7b4fd56mr1850684oil.55.1652259853760; Wed, 11 May 2022 02:04:13 -0700 (PDT) MIME-Version: 1.0 References: <20220510080533.51032-1-yiyang13@huawei.com> In-Reply-To: <20220510080533.51032-1-yiyang13@huawei.com> From: Max Filippov Date: Wed, 11 May 2022 02:04:02 -0700 Message-ID: Subject: Re: [PATCH -next] xtensa/simdisk: fix error handling in proc_read_simdisk() To: Yi Yang Cc: Chris Zankel , Al Viro , "open list:TENSILICA XTENSA PORT (xtensa)" , LKML , Jens Axboe , wangweiyang2@huawei.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Yi, On Tue, May 10, 2022 at 1:07 AM Yi Yang wrote: > > The frist simple_read_from_buffer() will change ppos. if ppos >= 1. > The second simple_read_from_buffer() will does not work and return 0. > > Fixes: a69755b18774 ("xtensa simdisk: switch to proc_create_data()") > Signed-off-by: Yi Yang > --- > arch/xtensa/platforms/iss/simdisk.c | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) Thank you for the fix. I've rearranged the patch a bit, expanding the commit message and fixing the build warning that it introduced and have posted v2. If there's no objections to it I'll add it to my xtensa tree. -- Thanks. -- Max