From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDF83C07E95 for ; Tue, 20 Jul 2021 16:31:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC6A2610A7 for ; Tue, 20 Jul 2021 16:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234767AbhGTPvN (ORCPT ); Tue, 20 Jul 2021 11:51:13 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:39442 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234075AbhGTPlm (ORCPT ); Tue, 20 Jul 2021 11:41:42 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id DB66022481; Tue, 20 Jul 2021 16:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1626798139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WZA+t59IQcbVAiLhkMJnA18Ht8/zfyrFAG5q5iwoqnk=; b=aEdmbKBHeYSyfjke61sw4eNWnw2riegKCAmuHYY4SjdOZdAoRKwFmgV+FXwWFAatXVbhmP hjpUfW9QHe4ezBTLgemrkasj7Ot18Y/XpIOYqBWaub3GXR84OKGcP2Y1Lxfso8yRiLGJQ8 92DoG8FvzhSVDSgva5YlTGOIsBkCETI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1626798139; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WZA+t59IQcbVAiLhkMJnA18Ht8/zfyrFAG5q5iwoqnk=; b=nyy7jymK/9+0XVJ3460tRxQ6wQJkf+/iOBpdh4wAgwH0meInQ56CFUjYB5K6K1HaU/87jr jPTIvY+ZVTHGsRBA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id C567EA3B8B; Tue, 20 Jul 2021 16:22:19 +0000 (UTC) Date: Tue, 20 Jul 2021 18:22:19 +0200 Message-ID: From: Takashi Iwai To: Colin King Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] ALSA: sc6000: Fix incorrect sizeof operator In-Reply-To: <20210720161707.74197-1-colin.king@canonical.com> References: <20210720161707.74197-1-colin.king@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Jul 2021 18:17:07 +0200, Colin King wrote: > > From: Colin Ian King > > Static analysis is warning that the sizeof being used is should be > of *vport and not vport. Although these are the same size it is not > a portable assumption to assume this is true for all cases. Fix this > by using sizeof(*vport). > > Addresses-Coverity: ("Sizeof not portable") > Fixes: 111601ff76e9 ("ALSA: sc6000: Allocate resources with device-managed APIs") > Signed-off-by: Colin Ian King Thanks. I have another patch to drop this allocation (it's just a pointer, so no need for kmalloc, really), but since your patch is correct, I'll rebase on yours. Takashi