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