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=-5.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 E9F65CA9EC0 for ; Mon, 28 Oct 2019 13:15:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA14E20578 for ; Mon, 28 Oct 2019 13:15:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729944AbfJ1NPp (ORCPT ); Mon, 28 Oct 2019 09:15:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:59160 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726508AbfJ1NPo (ORCPT ); Mon, 28 Oct 2019 09:15:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D6165AE0C; Mon, 28 Oct 2019 13:15:42 +0000 (UTC) Date: Mon, 28 Oct 2019 14:15:42 +0100 Message-ID: From: Takashi Iwai To: Markus Elfring Cc: Navid Emamdoost , alsa-devel@alsa-project.org, Navid Emamdoost , Kangjie Lu , Stephen McCamant , Greg Kroah-Hartman , Richard Fontana , Thomas Gleixner , kernel-janitors@vger.kernel.org, LKML , linux-doc@vger.kernel.org Subject: Re: [alsa-devel] ALSA: korg1212: Checking exception handling in snd_korg1212_create() In-Reply-To: References: 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Oct 2019 10:00:21 +0100, Markus Elfring wrote: > > > The code path is after snd_device_new() which has its own destructor callback. > > Thanks for your reminder. > > Can the properties of this programming interface be documented also together > with the function declaration for the safer handling of ALSA components? > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/sound/kernel-api/writing-an-alsa-driver.rst?id=d6d5df1db6e9d7f8f76d2911707f7d5877251b02#n567 I can think of only adding some comment at each point mentioning that the resource will be managed by the device destructor. > Can any more API information help to improve automatic source code analysis > around similar functions? If anything we can add, let me know. Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Date: Mon, 28 Oct 2019 13:15:42 +0000 Subject: Re: [alsa-devel] ALSA: korg1212: Checking exception handling in snd_korg1212_create() Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Markus Elfring Cc: alsa-devel@alsa-project.org, linux-doc@vger.kernel.org, kernel-janitors@vger.kernel.org, Greg Kroah-Hartman , Kangjie Lu , LKML , Richard Fontana , Navid Emamdoost , Stephen McCamant , Thomas Gleixner , Navid Emamdoost On Mon, 28 Oct 2019 10:00:21 +0100, Markus Elfring wrote: >=20 > > The code path is after snd_device_new() which has its own destructor ca= llback. >=20 > Thanks for your reminder. >=20 > Can the properties of this programming interface be documented also toget= her > with the function declaration for the safer handling of ALSA components? > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/D= ocumentation/sound/kernel-api/writing-an-alsa-driver.rst?id=D6d5df1db6e9d7f= 8f76d2911707f7d5877251b02#n567 I can think of only adding some comment at each point mentioning that the resource will be managed by the device destructor. > Can any more API information help to improve automatic source code analys= is > around similar functions? If anything we can add, let me know. Takashi 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=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 8E1AECA9EC0 for ; Mon, 28 Oct 2019 13:16:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1240A20578 for ; Mon, 28 Oct 2019 13:16:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="lgh8vs/w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1240A20578 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 40BF81F25; Mon, 28 Oct 2019 14:15:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 40BF81F25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1572268597; bh=YQEFz1KVn5EaZif3OxiqFnAlTTNmy8f2MfVqnApg2LU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lgh8vs/wPx6BSht2f01W7+dTUMmlEVlsO4JjLkBOzPwhHpQXL7oyP/YJRoQ7psZI7 M0DbVxDKGNeMoqUn2XKjyjKxWygRyZ1ApfmjWghzteAyI1BDObFau8PRMJlTQyDzFS bCoXR/UUcta8LviljLKzKsPhrzK9/joXrKYZsE+M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D8BFAF802BD; Mon, 28 Oct 2019 14:15:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2B3C6F80361; Mon, 28 Oct 2019 14:15:46 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DC1A4F8011D for ; Mon, 28 Oct 2019 14:15:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DC1A4F8011D X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D6165AE0C; Mon, 28 Oct 2019 13:15:42 +0000 (UTC) Date: Mon, 28 Oct 2019 14:15:42 +0100 Message-ID: From: Takashi Iwai To: Markus Elfring In-Reply-To: References: 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") Cc: alsa-devel@alsa-project.org, linux-doc@vger.kernel.org, kernel-janitors@vger.kernel.org, Greg Kroah-Hartman , Kangjie Lu , LKML , Richard Fontana , Navid Emamdoost , Stephen McCamant , Thomas Gleixner , Navid Emamdoost Subject: Re: [alsa-devel] ALSA: korg1212: Checking exception handling in snd_korg1212_create() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 28 Oct 2019 10:00:21 +0100, Markus Elfring wrote: > > > The code path is after snd_device_new() which has its own destructor callback. > > Thanks for your reminder. > > Can the properties of this programming interface be documented also together > with the function declaration for the safer handling of ALSA components? > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/sound/kernel-api/writing-an-alsa-driver.rst?id=d6d5df1db6e9d7f8f76d2911707f7d5877251b02#n567 I can think of only adding some comment at each point mentioning that the resource will be managed by the device destructor. > Can any more API information help to improve automatic source code analysis > around similar functions? If anything we can add, let me know. Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel