Received: by 2002:ab2:1c04:0:b0:1f7:53ba:1ebe with SMTP id f4csp55775lqg; Fri, 26 Apr 2024 08:37:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8/icDLx2IjK4NDdKIV/dMF4KDwQ/hDYVokaIygm25T2ii40uw/sKn8ugYp4mtzP+VNylbFrAw56O1xZSocMSQk/0e8CMeqcxzvn0nPg== X-Google-Smtp-Source: AGHT+IGOz0DzaSIYBQEsKNf5/Zqmlvcrn8FqkWkqy/XZ3ZcrD3UtSo3Qm3r/cz4stZp7SOOwCK3m X-Received: by 2002:a05:6a00:2441:b0:6ec:f282:f4ea with SMTP id d1-20020a056a00244100b006ecf282f4eamr3489801pfj.34.1714145851331; Fri, 26 Apr 2024 08:37:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714145851; cv=pass; d=google.com; s=arc-20160816; b=iCRcC6q4tvJJEBdwmB5K7S2n78VSyAyp2+H5UBSz9F3RyXLju/hyQTXAtRtHmX8wse PUhGXq22DuHPPF1rB6iykSW+vmIOcBUVOanKHDdeV663FTYzUzRfajFEn8M+YBTHmaID jjZpZteI4+DXPxbE85elUCZCWUrU9gD2Jm745z2EXS6mj7NlgxOVcEtY88ka421mMi1j 1iQJtk4mNRxXpQoJCDkNqZw4TvQSDwtPkfKn496/V1qZU4U54ef4aQO5BoxfmGxaOmqA oIZlw5zdyXE7qazL+Au+VKtTq7+xD4ye9KR0ybLUP8gJ72MSG/CrM3a8aboD1EhYcizo qgVA== 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=gd6ILVzk0t6uXM79Zttkn5VJ29kj20R5ZD7OwenGmLo=; fh=N3bTtGY+P20fN/V4nFAu9mcy5l31hjUTZxiRIcxvG8c=; b=nz2bsixrJUnrePueFdG9vGYbW4Bgoun3wCk7DyFze/fdRoaliKP5tTmefBUbiUkYLA MdmFhIUlIizZp4sSWijltboMg9V1UGDP8aVTZm2YTQBV4P/OgojLvaGpXI4mjCfoRGUq HZpowWxmBS6bR4ODgV+SkaZkB6n65NOgo8jw0u37HBTFLTn/JPbC6XpqhgYp3na9+0+Q W1EB+s+aCE1nDbCEShnUXS0ID5iZes/ilG3FZF4KlPG6o8hMUbl994HnTSJ+KgvmUvM0 ReUrSGSjj6fpyVfGoakJjeK884wY9imL+UdfdX/i/tJuBVNt+chihNAKdz+PX9q1UlwJ rhZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A28551tf; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-160300-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k132-20020a62848a000000b006ea93e60f84si15298592pfd.191.2024.04.26.08.37.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:37:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160300-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A28551tf; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-160300-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E5537282AEA for ; Fri, 26 Apr 2024 15:32:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D32B6149C43; Fri, 26 Apr 2024 15:32:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="A28551tf" Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7357D149E00 for ; Fri, 26 Apr 2024 15:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714145562; cv=none; b=GU7REhY0NnehW1uCeX7Y4E+gsKuOdhvnMKlUFANilxDN03bIGZKFa3qj+IudboRQkrgRAaORSHEcNOnBKQOVnyKQEvPuuk2D8G/fiRlAq889jmHSm5dWpNiYBek4JRt+IPa3lKkaniBdKhXrldg4JzcE2MT+VuTwFbyapYrzybo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714145562; c=relaxed/simple; bh=qklciRQxec8j59g3ZMuTPWOVbw7bNHFK9MOa3OI5oBg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eVunE8u82dgAs/XHuAejHYsMdK4oguMLjnD3jrJs+uZ4FaPMQKKgUqwH8Ocw/9QSAYN+9eFwPb7kI2FWCoZxzPxyewHBJ4VBH+76O+NDvjp/uSIBWyS7HI11C/HARd2Oxfl3SxvjdxurcGm3SQ8cM8t5fmOLxRRlZ/9z+Wv9mww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=A28551tf; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a55ab922260so312325266b.3 for ; Fri, 26 Apr 2024 08:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714145559; x=1714750359; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gd6ILVzk0t6uXM79Zttkn5VJ29kj20R5ZD7OwenGmLo=; b=A28551tf4kbu1BWESsy4bxyXyR2ba8bom2utsMw0Hg72G0xIITj3xZfKWgE5xY5WXU NFd3IJxvzScIibRBwpGr3rTMgMaUlS/2+xKlM8KNQz42p4x6hHay6+O1Pd8Eqj/2n6sx Kx5DdMEhJFrWJf/SE1e+TjtaNp5+rDyDLB03m2Zj9hS0PJQozPKn9BS29o+dsP5yIV1b bPYktCaCov0pq6s+G7N5/yIXFI0Tsqpi97Nc4fh96lE+eZTzgJZgL7ebGdCUf3GCxuzs dcIB3dHROUfVMYPw8Z3R737XfyXMpJLlHhuk6bhk7oYCfJKG8VbVumwhtnljdfDgXVli Y2TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714145559; x=1714750359; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gd6ILVzk0t6uXM79Zttkn5VJ29kj20R5ZD7OwenGmLo=; b=KivFaTMzxgzIikv1QJvMu2KbMdaewhTloZ1M4Qgbh/srgo1LGJTWtihr7IJkARq6GU yfnQa4W4SlAplhjd16Jd55m3+bjCjijif+C/kqKHLQZsenH/m2nLd9Ddo5HJL89lTJrl b3yWajdJScyvxkeu3G3yF6gV+nghMFe5hIUZO3IJQgiqE603gI4nPN8LveLjgtnVtY/t wub+LTvcNTc7SZJQ7A7B2GvZUhPuwYyrnTKnqax1IUSYdF3rdKDJqCzv8TK03APqhlq3 JGnEc+P2crbcPhe+b9kA247vLPQOiu6+RzVDEM4wDqTn9rTFDvIemAKEBcy9FHfYU/E5 YgVg== X-Forwarded-Encrypted: i=1; AJvYcCWTRwVTG+ZOVeNGERtRRkSWdEtevU5YA6aQfjcoOVCecZ506bUWes81zluIZSro5SGJ7QM3ZL1ibt2yqnw//kiwEqIGwQpQezi63F9b X-Gm-Message-State: AOJu0YyX27O0iESLet/pcpBnv6iB9tHIWb48bwf1HNEAk+AzfZfQgCe9 H4HsDNujyZ03s56E3WPNoTckrN0vUxhCKGlHR+/msvd2ghqyvJHwBEMGVrOsqeNTSDUZ6gi4I/5 U X-Received: by 2002:a17:906:13c7:b0:a51:f463:cfa6 with SMTP id g7-20020a17090613c700b00a51f463cfa6mr2046211ejc.29.1714145558440; Fri, 26 Apr 2024 08:32:38 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id z12-20020a170906270c00b00a55895c7f50sm9192735ejc.151.2024.04.26.08.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:32:37 -0700 (PDT) Date: Fri, 26 Apr 2024 18:32:33 +0300 From: Dan Carpenter To: Andy Shevchenko Cc: lumingyindetect@126.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, ilpo.jarvinen@linux.intel.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, LuMingYin <11570291+yin-luming@user.noreply.gitee.com> Subject: Re: [PATCH] serial: 8250_lpss: Fix memory leak in lpss8250_probe() Message-ID: <047e490b-0dbf-49b7-9506-996f0053e92d@moroto.mountain> References: <20240426114716.1275085-1-lumingyindetect@126.com> <87d376e4-84f1-48c3-8c5d-955f706f3bfb@moroto.mountain> 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: On Fri, Apr 26, 2024 at 05:45:49PM +0300, Andy Shevchenko wrote: > On Fri, Apr 26, 2024 at 04:53:18PM +0300, Dan Carpenter wrote: > > > > Fixes: e88c4cfcb7b888ac374916806f86c17d8ecaeb67 > > > > This is the wrong hash and the format is wrong. It should be: > > > > Fixes: 254cc7743e84 ("serial: 8250_lpss: Switch over to MSI interrupts") > > Since you are here, just pay attention that this does NOT fix anything > as it uses pcim_enable_device(). I hope smatch won't stumble over this > and produce false positives. > Ah... No, this isn't a Smatch warning. I think I tried to add it but was told it was wrong because I have this in my unpublished code. :P // Are these affected by pcim_enable_device()? // { "pci_alloc_irq_vectors", ALLOC, 0, "$", &int_one, &int_max }, // { "pci_free_irq_vectors", RELEASE, 0, "$" }, So when we're using pcim_enable_device(), calling pci_free_irq_vectors() is harmless but not necessary? regards, dan carpenter