Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp18648rdb; Mon, 4 Dec 2023 18:31:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQDTBaxtPC9VR7+mT6mRkI7t840hv65/g8u3YnlQEuQGOPw80odganq/fvcxw0zT8x2cwo X-Received: by 2002:a05:6a00:1503:b0:6ce:5837:747c with SMTP id q3-20020a056a00150300b006ce5837747cmr923134pfu.46.1701743481952; Mon, 04 Dec 2023 18:31:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701743481; cv=none; d=google.com; s=arc-20160816; b=rPLtgfiru7xQa4v/g1uZUh0h9AW/KMn9RXprHGSH01XD35VhvOFjB8wgGqjK0pCAac Zd9hthXydnqoQZqVDKT+03tXum4uchxOavVOWNRPvs2yA/sW6pCEgkkIiMkFXRCsTIQ9 +fh79/Fup78ngs6WVOelj3ALTLin47FxbMJ4lQ36icv+RM+ievElfBf1bvnd0anqOLqo /WxtUbNKVxGO+0F8U4EFbe7VoLBLDmBE0PxcYV/ZsRlsvy+hzuekLkPHaBswx+5ayDFK 7GkdCynbVMUiWuH3peJC1i/vL+MUB8JDMz+XLRgqpwXuTgNDLusmnoSbmhBuJJGxS8v0 WHyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc:to :content-language:subject:user-agent:mime-version:date:message-id; bh=faioPC7eR7GB4MG37SDbKVGotB0ZiZY4Lqx3cMyLW1Y=; fh=iVXlt/o+JVpiy1BciQhH5tweaceJ22l4qp16djZT6gE=; b=m4yhIXbmNeGhpIdQm9Lo5w92VNRupiRO5IduPyQ/PDAZL4Pleqrb24YRQbpBVxVYI3 Lz9/HPlbcPxksDC+yOjGzsV/bcdnyF+f5XObha/az8mF/Wsc3QbTiPPOm9XHCuBPDsFq T7GmW9VxfqTt+Mp/aM7aCltoqpCBYX7ktj8/tRbO2B8CK1/EwfzJFZqwNuat9EsBw+hQ Az3fCYKmgEUXwNVpW01EdVT3rIq41T5CFqYrTKbU795onsM/46SRTpx15rlXZXp6Nozi KyUdIgQr2rraopeA+aidqItJr8Bn4lbVq8YmaBVPakYhtUP4zzy+iesgFq3CxI7xDS9y 9rTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id z6-20020a63d006000000b005c212ebb55csi9006002pgf.691.2023.12.04.18.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:31:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 42B2F80A9AA5; Mon, 4 Dec 2023 18:31:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343967AbjLECbD (ORCPT + 99 others); Mon, 4 Dec 2023 21:31:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376510AbjLECam (ORCPT ); Mon, 4 Dec 2023 21:30:42 -0500 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 95CEAD4C; Mon, 4 Dec 2023 18:30:47 -0800 (PST) Received: from [172.30.20.54] (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id A473660598E85; Tue, 5 Dec 2023 10:30:22 +0800 (CST) Message-ID: <098b1c0f-f303-3708-939a-28ecaf2185c3@nfschina.com> Date: Tue, 5 Dec 2023 10:30:22 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v3] misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write Content-Language: en-US To: alexander.usyskin@intel.com, Greg KH , Dan Carpenter Cc: tomas.winkler@intel.com, arnd@arndb.de, nathan@kernel.org, ndesaulniers@google.com, trix@redhat.com, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui In-Reply-To: <2023120425-broaden-image-fdc9@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 04 Dec 2023 18:31:19 -0800 (PST) On 2023/12/4 21:17, Greg KH wrote: > On Mon, Dec 04, 2023 at 04:11:31PM +0300, Dan Carpenter wrote: >> On Mon, Dec 04, 2023 at 09:00:42AM +0100, Greg KH wrote: >>>> diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c >>>> index 7ea80779a0e2..0489bec4fded 100644 >>>> --- a/drivers/misc/mei/client.c >>>> +++ b/drivers/misc/mei/client.c >>>> @@ -2033,7 +2033,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time >>>> hbuf_slots = mei_hbuf_empty_slots(dev); >>>> if (hbuf_slots < 0) { >>>> rets = -EOVERFLOW; >>>> - goto out; >>>> + goto err; >>> Please prove that this is correct, as based on the code logic, it seems >>> very wrong. I can't take this unless the code is tested properly. >> Hi Greg, >> >> When Su Hui sent the v2 patch you sent an auto response about adding >> stable to the CC list. >> https://lore.kernel.org/all/2023112042-napped-snoring-b766@gregkh/ >> >> However, it appears that you still applied the v2 patch. It's in >> linux-next as commit ee6236027218 ("misc: mei: client.c: fix problem of >> return '-EOVERFLOW' in mei_cl_write"). >> >> When I use `git am` to apply this patch, then it doesn't apply. However, >> when I use cat email.txt | patch -p1 then it tries to reverse the patch >> and apply it to a different function. > Odd, I missed that I had already applied the first one, nevermind, that > one is correct, this one was wrong :) Hi, Oh, sorry... I'm not familiar with mei device, I send this v3 patch because of Sasha' s suggestion.[1] Could Sasha give some advice about this ? Thanks a lot :) https://lore.kernel.org/all/CY5PR11MB63668F464A281A239FA12B6AEDBDA@CY5PR11MB6366.namprd11.prod.outlook.com/