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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2E75C64EC7 for ; Tue, 28 Feb 2023 11:52:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230480AbjB1Lwq (ORCPT ); Tue, 28 Feb 2023 06:52:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbjB1Lwp (ORCPT ); Tue, 28 Feb 2023 06:52:45 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F4EC2C67A; Tue, 28 Feb 2023 03:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677585164; x=1709121164; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ggyx2CAu7EyosRp281wE2F+gng0S6AmQ8+oXpM+KpQ4=; b=YeLWYsZ4z/YaWHrxYD+vojGJ9b4jEbXHPdxpc+FStpj1DjVBeXtBqut1 Aj/C5ejVUhPCxdgw/2X3ssi8Gt6YAjKzN2dozOGtBSYUWQ1uk3PWKJE/W mXIchaoLl3tVuN+bZIDHQi2ccyj/hvJMFCycqa69GBTl7l1gZIs3mLCeP 0tbAA+WFmD/P2zVSfAAlrG4q94RS/gZCK/xDYrx0cJARq2DbMg9PEgoQ+ 5dpvfE3BNTA66+GAhRQqxkkEqhgqeoSH6tNPvRvjjfldUGWBDyrNr2FGg W/5NZ8anMfsotzXr9N/vCLt85lWlilmXJoH7j5oJxNZTLlod38lccX8d4 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="336405103" X-IronPort-AV: E=Sophos;i="5.98,221,1673942400"; d="scan'208";a="336405103" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2023 03:52:44 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="674099409" X-IronPort-AV: E=Sophos;i="5.98,221,1673942400"; d="scan'208";a="674099409" Received: from joe-255.igk.intel.com (HELO localhost) ([10.91.220.57]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2023 03:52:41 -0800 Date: Tue, 28 Feb 2023 12:52:39 +0100 From: Stanislaw Gruszka To: Jeffrey Hugo Cc: ogabbay@kernel.org, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, jacek.lawrynowicz@linux.intel.com, quic_pkanojiy@quicinc.com, quic_carlv@quicinc.com, quic_ajitpals@quicinc.com, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v2 3/8] accel/qaic: Add MHI controller Message-ID: <20230228115239.GH3547587@linux.intel.com> References: <1675698105-19025-1-git-send-email-quic_jhugo@quicinc.com> <1675698105-19025-4-git-send-email-quic_jhugo@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1675698105-19025-4-git-send-email-quic_jhugo@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Mon, Feb 06, 2023 at 08:41:40AM -0700, Jeffrey Hugo wrote: > + mhi_cntl = kzalloc(sizeof(*mhi_cntl), GFP_KERNEL); [snip] > + mhi_cntl->irq = kmalloc(sizeof(*mhi_cntl->irq), GFP_KERNEL); I recommend usage of devm_kzalloc(), devm_kmalloc() for those to simplify error and exit paths. Regards Stanislaw 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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B72B0C7EE2E for ; Tue, 28 Feb 2023 11:52:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 013BF10E4C4; Tue, 28 Feb 2023 11:52:47 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id CEFCD10E4C4 for ; Tue, 28 Feb 2023 11:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677585164; x=1709121164; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ggyx2CAu7EyosRp281wE2F+gng0S6AmQ8+oXpM+KpQ4=; b=YeLWYsZ4z/YaWHrxYD+vojGJ9b4jEbXHPdxpc+FStpj1DjVBeXtBqut1 Aj/C5ejVUhPCxdgw/2X3ssi8Gt6YAjKzN2dozOGtBSYUWQ1uk3PWKJE/W mXIchaoLl3tVuN+bZIDHQi2ccyj/hvJMFCycqa69GBTl7l1gZIs3mLCeP 0tbAA+WFmD/P2zVSfAAlrG4q94RS/gZCK/xDYrx0cJARq2DbMg9PEgoQ+ 5dpvfE3BNTA66+GAhRQqxkkEqhgqeoSH6tNPvRvjjfldUGWBDyrNr2FGg W/5NZ8anMfsotzXr9N/vCLt85lWlilmXJoH7j5oJxNZTLlod38lccX8d4 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="336405106" X-IronPort-AV: E=Sophos;i="5.98,221,1673942400"; d="scan'208";a="336405106" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2023 03:52:44 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="674099409" X-IronPort-AV: E=Sophos;i="5.98,221,1673942400"; d="scan'208";a="674099409" Received: from joe-255.igk.intel.com (HELO localhost) ([10.91.220.57]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2023 03:52:41 -0800 Date: Tue, 28 Feb 2023 12:52:39 +0100 From: Stanislaw Gruszka To: Jeffrey Hugo Subject: Re: [PATCH v2 3/8] accel/qaic: Add MHI controller Message-ID: <20230228115239.GH3547587@linux.intel.com> References: <1675698105-19025-1-git-send-email-quic_jhugo@quicinc.com> <1675698105-19025-4-git-send-email-quic_jhugo@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1675698105-19025-4-git-send-email-quic_jhugo@quicinc.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, ogabbay@kernel.org, dri-devel@lists.freedesktop.org, quic_ajitpals@quicinc.com, quic_pkanojiy@quicinc.com, quic_carlv@quicinc.com, jacek.lawrynowicz@linux.intel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Feb 06, 2023 at 08:41:40AM -0700, Jeffrey Hugo wrote: > + mhi_cntl = kzalloc(sizeof(*mhi_cntl), GFP_KERNEL); [snip] > + mhi_cntl->irq = kmalloc(sizeof(*mhi_cntl->irq), GFP_KERNEL); I recommend usage of devm_kzalloc(), devm_kmalloc() for those to simplify error and exit paths. Regards Stanislaw