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 5F53EC433FE for ; Sun, 23 Oct 2022 12:41:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230174AbiJWMl4 (ORCPT ); Sun, 23 Oct 2022 08:41:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbiJWMlu (ORCPT ); Sun, 23 Oct 2022 08:41:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA38F1B782 for ; Sun, 23 Oct 2022 05:41:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 85A3CB80D96 for ; Sun, 23 Oct 2022 12:41:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF01CC433C1; Sun, 23 Oct 2022 12:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666528907; bh=ZcLrORXzdng+Ees4GQI/HwV2AU9kcNTHbFHlMCos+OI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ljwjrA4u4nC0E3yZ8ql4IzsHHP7gb7D18O91Zo4ZlTkDDNNwHq+MNzsmWMfETJnQT wEgYp84s9ywwf1p7Yi0La0tJWZL/hedl+jipvfli+2b9DuAZSr8d5fuGm1HXfWNqIo Ch7xjSuuFZFx3Yxl55GMLtwmYtyIJwca5PCr9h6s= Date: Sun, 23 Oct 2022 14:41:44 +0200 From: Greg Kroah-Hartman To: Oded Gabbay Cc: David Airlie , Daniel Vetter , Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jason Gunthorpe , John Hubbard , Alex Deucher , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Yuji Ishikawa , Jiho Chu , Daniel Stone , Tvrtko Ursulin , Jeffrey Hugo , Christoph Hellwig , Kevin Hilman , Jagan Teki , Jacek Lawrynowicz , Maciej Kwapulinski Subject: Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices Message-ID: References: <20221022214622.18042-1-ogabbay@kernel.org> <20221022214622.18042-4-ogabbay@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221022214622.18042-4-ogabbay@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 23, 2022 at 12:46:22AM +0300, Oded Gabbay wrote: > +/** > + * accel_open - open method for ACCEL file > + * @inode: device inode > + * @filp: file pointer. > + * > + * This function must be used by drivers as their &file_operations.open method. > + * It looks up the correct ACCEL device and instantiates all the per-file > + * resources for it. It also calls the &drm_driver.open driver callback. > + * > + * RETURNS: > + * > + * 0 on success or negative errno value on failure. > + */ > +int accel_open(struct inode *inode, struct file *filp) > +{ > + struct drm_minor *minor; > + > + minor = drm_minor_acquire(iminor(inode), true); > + if (IS_ERR(minor)) > + return PTR_ERR(minor); > + > + return __drm_open(inode, filp, minor); > +} > +EXPORT_SYMBOL(accel_open); EXPORT_SYMBOL_GPL() please. And again, this should probably to into drivers/accel/ not here. thanks, greg k-h