Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5421323rwi; Sun, 23 Oct 2022 05:58:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5JJRHp60/vWKhimL6ggxN+fqvKJMGbaplQhLdGd+vePBQlAnnNmcqaSXDhLuSZ/LPSy6N1 X-Received: by 2002:a17:906:30c5:b0:782:707:9e2d with SMTP id b5-20020a17090630c500b0078207079e2dmr22836806ejb.286.1666529890613; Sun, 23 Oct 2022 05:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666529890; cv=none; d=google.com; s=arc-20160816; b=HNdNK8/9DNF22TyH0p7y/hx/gL4AtKi07a8R9k2Fv1zk3QvtXUuJBhmRQt1BJYW4H0 OihvHaBDsX48jqXNUg1gUVazsigehNQxC2CsKYsf/Wh5wa11t4CAV8QDq9C+OzZkYpFv 6gAEKBENXgIyx3g2VCuNSadcuIvw9lfzEKtZFhcPuAGgukXMOYKsQs/yJgaNsfrT1ITH 8XrWI/nEdQJ8auiFZagvfSS+ditGwb4YEauv9gToOxL0G1WOHVMCjPI2en4IHPNsPekQ p1s/PCaY1ZwArVQ7khx9MHFCS/ZYvzinMTCP4wUI8hE5rTri9cdFxKVp1JrbZ4R5jQG8 S8bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3MNIsa1MtNkGcl/bPQ2IcuNXhhn9/FblRYR3P96meyY=; b=vDwo5a97oF22IZQo/3zCgRbamIPIb6sWBvDZ6tJdSXwOvnn1tWo8xGOn0UxGXZNjZw hOs4Al3Pe5QIeg+1QvwV4PIkEz7cZ+eLy9+3gNXpFnFkdUcGlAGLbVslywnfF29T6Csx fEyfGyq8v1JmonsEWdX4eEMgQwqhTDMBEL+IWXmc8Z0jhjByxU4zYOMnwrKFfqBRE1IB HcUCo+WjKP+IJqebbuI4HR5bc5FaaZPYSbNrxbaUt2apwitjDGpl7bZKp5goSTHMXai3 azbKJOcYy5iV1iEWX/K3NQgsi157xXshEjhSGaOMnoquoudhdbAftyO8VO3IkFBVzxrP gQLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ljwjrA4u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a056402500b00b0045d292ef641si25462695eda.493.2022.10.23.05.57.45; Sun, 23 Oct 2022 05:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ljwjrA4u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230166AbiJWMlz (ORCPT + 99 others); Sun, 23 Oct 2022 08:41:55 -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> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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