Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp136506lqk; Wed, 13 Mar 2024 20:17:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXo2EGtvMx/X3voZkT7Cd5YSzg6UTB5ZJ9D4M/qC4ADPPxvmpmUzJzAuYO55wAQ1WGnYnq3qT9JCaBUNeDlYMMv5FaZuA66ML/KkITJOQ== X-Google-Smtp-Source: AGHT+IGMoce+Ai8IoywBE3yS3VegVgxgX1ATwlJpZ2fk18tk3jYjIgj0z2RE9GqB4slG/qzxUUv5 X-Received: by 2002:a4a:351a:0:b0:5a1:bb9d:56a7 with SMTP id l26-20020a4a351a000000b005a1bb9d56a7mr759908ooa.8.1710386236963; Wed, 13 Mar 2024 20:17:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710386236; cv=pass; d=google.com; s=arc-20160816; b=iSWZ/LyEw4c91NN4v1AEDOkaKkX20esH83PIu5kxK5W5/Gris8XijGRUcisLoFQm45 05UEe1Qw6qppdbuiS5AtmGescWABDWiuOriaNoH2v1gzVHSvR7OFIF0iPcP6700xX9tq +2xAGYOk8apQyZRdFxI+4g//+MeOLYIHK2EdNBqJ7xMBHxCXaIGzopkY/EefkJTrgwWr PS9PvA7R+3RhDb6Pce/4n3t9bkr5/im7J4usCSKS0rzgLXIev65+xshuMAF/kTq083w0 RZ3r+il42L+1FGMWwfwrYZx95AbLQ8ELG5RvVbyuSINCmdJ2xOaEU554eaThv8xGm7+g qF1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kxI3PC1lCYf7lGzHYrEtRXfRT6nj6eYre9CeqNN6v0Q=; fh=qGXeLechSuQb8Ik9qmcANgOk+eBjWeq9T2H2p0nBfOw=; b=jlKJylYN3MJ75z0iPyJHk01xuF1hZFsOtwJntZg1AmgJpwcmMwZDVIpOdwSXslPGbx XBgFaELJ5JMoDpFIMKEACTYurfdnDK08DDLM3FzEKmUvgeYThmHClbTOgQNlHY2PFLQT ULEqqBQ2POSu9NRJpp2zjALJz/KbAVA3JdgexbkIxOoVT9HtpmSyxFbtT2q77MLpdJ84 9P1jknrL8fiyhWHSl1b58IoemxCLQ8xIQjzdJNOupYft3NWAoVN8ftE4H1wuZd6hrJT7 o4nUseBMVMkgjHijuI3AM7sOaRzysOuZuJWWZ4lfUPYYxhiZpf7HDuPaS87syHVtLWBD MgaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=u4eZFYqP; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-102740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s35-20020a634523000000b005dc42a836a3si624671pga.625.2024.03.13.20.17.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 20:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=u4eZFYqP; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-102740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7A3A1B22CCD for ; Thu, 14 Mar 2024 03:17:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2067A524C; Thu, 14 Mar 2024 03:17:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="u4eZFYqP" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE9624696; Thu, 14 Mar 2024 03:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710386223; cv=none; b=WzTdb1We6fDsDIp+z2L4mry/XnwKmSS299Zu5LN5hYEFgC6ZpT7f7rU2ahhc8BMtmLm9tQqRNqDqguRyhMXIEFkPNE+XWofqFuBp7KGTPyXiq5gJh7hiJClaj5Yfn9LMs+cL7hDewVuTMVDxtUvWP7QmyYimf7j9lOdypKti4DQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710386223; c=relaxed/simple; bh=2RUoR0XMlC0ukB2bDbtp4kG2XgPkgjcgNCItE8TpMIA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H2GD/K3mplowWhQF+FXprxjGoK53wTRrGcweIE67gTQ3KnqQXqr8MwNsojqe/VF/EmIrjQf6GH8iyaQq+C4g0m3G4fgNa3LPIaT6UoN++MHMI7SOkQ6TiZJOvoi7MnJT1HVh5WkeIhMSta+UQGkr8vLQ3SayLjVcEKB9G2qB34Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=u4eZFYqP; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=kxI3PC1lCYf7lGzHYrEtRXfRT6nj6eYre9CeqNN6v0Q=; b=u4eZFYqP5qA3mh07q4/0qd8O9l NhgN/gjtMEfqEHaeH3XNbj4GtIhPU3B0JbOW7syfBZ62PsWvu9L+WpS6sjB01l40Vpd6DDwT/1lkf 2TXgwVwKerLfQemomJNf370Q6rnwnf0TT66UpjVE32Ql8AUU6r7sPxJarAzMax4N+TMs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rkbb3-00AHd5-3z; Thu, 14 Mar 2024 04:17:33 +0100 Date: Thu, 14 Mar 2024 04:17:33 +0100 From: Andrew Lunn To: Jiapeng Chong Cc: isdn@linux-pingi.de, ricardo@marliere.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH] CAPI: return -ENOMEM when kmalloc failed Message-ID: <022e6eb0-2fc7-4115-b5b8-046084d845fe@lunn.ch> References: <20240314020103.54049-1-jiapeng.chong@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240314020103.54049-1-jiapeng.chong@linux.alibaba.com> On Thu, Mar 14, 2024 at 10:01:03AM +0800, Jiapeng Chong wrote: > The driver is using -1 instead of the -ENOMEM defined macro to specify > that a buffer allocation failed. > > drivers/isdn/capi/capi.c:154 capiminor_add_ack() warn: returning -1 instead of -ENOMEM is sloppy. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8522 > Signed-off-by: Jiapeng Chong The patch itself looks reasonable. The caller only cares about is the return code negative or not. So returning -ENOMEM or -1 makes no difference. Please take a look at: https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html You need to specify a tree you want this merged via. If you consider this a fix, you need to add a Fixes: tag. However, i don't see this patch meeting stable requirements. If this is just normal development, net-next is closed at the moment for the merge window. Please repost in two weeks time. Andrew