Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2703411rwb; Thu, 29 Sep 2022 13:56:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74qk/XEpBmaqlHUljtP4AbAsF3ULDAS3jA5cF4XJeWC3GyGFd+zqN7WHBV0fBAwYYwMB3h X-Received: by 2002:a17:907:6e14:b0:782:4659:14c1 with SMTP id sd20-20020a1709076e1400b00782465914c1mr4042291ejc.196.1664484976710; Thu, 29 Sep 2022 13:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664484976; cv=none; d=google.com; s=arc-20160816; b=aes/ZsBCbM04RPILyowUNg/iCQJt3YAZ4niL3t7PEkasW3VTRlC2nmUtEqIErG6qoL cZnI3FNxSESaWOBtYN0sInqiYCdvLycB1RFVWiO2bhGX2VuS15KBZDVcbi/PzEfdPOHN E0KMY6xzadWiu4LlsLUbKyZ8bn1XmDqAZyhYca8QEO1hYFVq3e4kI8MHGtm6lnWkA8V4 ywginvb4bDGQ4pgnqso4zMMBeece5rgWmoD0bdkLPgoZkZmSekPH9riu5Mf7nrrxIz/x UXul9cjc2shu/lLresFKovsxWowN5w5BVrhV6/xpMOsqoQl0OTZHx2aBkE+UDDc2nkLg fi2Q== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=H9rd+oTv5GMGM1TPz7tjk3H33t9w0+zXf4MssGv+aVY=; b=FeNSSam37hynyC0Whv3+IDjRnzMw1vUtGDZtVYOE2fDVPVjXM5istYTGFXbRAM+tuQ zweEEyLoLADl0sF+pdwY6wk44kVEd7MtoNeeFsSo2UJNgnsDLQP7MIjmUrbtkuBmQIZb dfF/tmdJc9VzoAreMChrKaIPfR9nupHIbSq/2oPzEhm2yz3/5X4eMbkzTx0HvoZgaf89 SgqvTWyP8CIrgXaEoO6K8GEgf0Smc0Cpwnd07J25ijIRLXhx/Sw6aDGLn1af6i/ePyuq JU1MbDfkG1wd+8Jj7n5xJIlxey7uQ1WvPW5xG/ns7rqjHmvvAkdSEHmn6ygnLR6e8qJQ XWhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VGnB3aMF; 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 hr24-20020a1709073f9800b00782b2a97825si236139ejc.337.2022.09.29.13.55.50; Thu, 29 Sep 2022 13:56:16 -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=VGnB3aMF; 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 S229566AbiI2Ual (ORCPT + 99 others); Thu, 29 Sep 2022 16:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbiI2Uaj (ORCPT ); Thu, 29 Sep 2022 16:30:39 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AD16109605 for ; Thu, 29 Sep 2022 13:30:38 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id x92so3460668ede.9 for ; Thu, 29 Sep 2022 13:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=H9rd+oTv5GMGM1TPz7tjk3H33t9w0+zXf4MssGv+aVY=; b=VGnB3aMFioBJTem01NR0YOvnGZlaiJTWAN8LUYpK5bFMUzeSgFrCzcx3EOwrKgT/kP ckNmPuYiiUKi48Iyhz/GWYBeZtYGcW9Ho26wPxj9zpIBnPDlgIknxo0eSxpMIy8HBctY wUWAbpJvRN/SnRG1ROO1SkbobnjlNftpCWcc1U6EtsaglrTNVd7v777H82EaDSpgFFAj lSZE888tSozQ5tOFag6vKCTKBqapyDEwz/HDZQRIt5+Ln3lpiArmYfM2e1q+uX/02vih JA3RHNqfnzH8NdLqmN2m39wEaIgQpXemobkL/jVsGlucTcN45mF9tzwMeUOBArkxCsXL ujYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=H9rd+oTv5GMGM1TPz7tjk3H33t9w0+zXf4MssGv+aVY=; b=qjueBdnURmfuKPTltMXPTzU0QQhD7gTONopWSychjjds12pp6hfhnn+hX7QrzdR4sf WQNH5uL3RBLaI1W0pLZ/lhJnBXeaDutBwhkCTpj5rqlJlrLkB9BiGgP/VAWd7gAVYHAL KXKdj4hJmQ8ANoByfJ49dm7YGEgJF/C1/eSSL5JYB+xMcJ48iu4S95v35D7dzvyi+/Jn o9R3PsFzSoPA2v6rGbw7gNZp2IQfLlLHqnJT8jt9WDR5pKmTOQGlILAJOVDhJYR2+y6v P3PzhS9i81tkY54FG2FGusMdIxVr/u2h0AI+asCSM4isv/teKB60UJaiSZDOHXVVJtzV O6dg== X-Gm-Message-State: ACrzQf0vJG7qUobt5wqsJvHweh2sapLy8S1GYz3oGGlh2vbJMYNoBstJ 4RH9rGfx7rBkxQEuS/4hB4/BRT3fU40= X-Received: by 2002:a05:6402:14c3:b0:457:faf8:1880 with SMTP id f3-20020a05640214c300b00457faf81880mr4755317edx.118.1664483437110; Thu, 29 Sep 2022 13:30:37 -0700 (PDT) Received: from [192.168.1.101] (p57ba2cf5.dip0.t-ipconnect.de. [87.186.44.245]) by smtp.gmail.com with ESMTPSA id s16-20020a170906355000b0078015cebd8csm71864eja.117.2022.09.29.13.30.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Sep 2022 13:30:36 -0700 (PDT) Message-ID: Date: Thu, 29 Sep 2022 22:30:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RFC PATCH v2 0/4] staging: vt6655: Implement allocation failure handling Content-Language: en-US To: Nam Cao , forest@alittletooquiet.net, gregkh@linuxfoundation.org, dan.carpenter@oracle.com Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev References: From: Philipp Hortmann In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On 9/28/22 19:21, Nam Cao wrote: > This driver does not handle allocation failure when receiving data very > well. This patchset implements better handling in the case of allocation > failure. > > Also do some necessary clean-up to implement this. > > v2: > - squash 3 commits that were doing a single thing > - add new commit which removes a redundant assignment > - take device_init_rx_desc() out of unnecessary else condition. > - remove return statement at the end of void function > - add a missing rd = rd->next statement in device_rx_srv(): because > we already drop the current buffer, we should move on to the next > buffer in the ring where new data will be written to. > > Nam Cao (4): > staging: vt6655: remove redundant if condition > staging: vt6655: change vnt_receive_frame return type to void > staging: vt6655: remove redundant assignment > staging: vt6655: implement allocation failure handling > > drivers/staging/vt6655/device_main.c | 40 +++++++++++++++++----------- > drivers/staging/vt6655/dpc.c | 8 +++--- > drivers/staging/vt6655/dpc.h | 2 +- > 3 files changed, 28 insertions(+), 22 deletions(-) > Tested-by: Philipp Hortmann