lkml.org 
[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH V2 02/12] misc: xilinx-sdfec: add core driver
    On Tue, Apr 09, 2019 at 11:06:44AM +0100, Dragan Cvetic wrote:
    > +++ b/include/uapi/misc/xilinx_sdfec.h
    > @@ -0,0 +1,42 @@
    > +/* SPDX-License-Identifier: GPL-2.0+ */

    That is not the proper SPDX license for a UAPI kernel header file :(

    Please fix this up.

    Also, why do you need a uapi file at all? Who is using these values?

    > +/*
    > + * Xilinx SD-FEC
    > + *
    > + * Copyright (C) 2016 - 2017 Xilinx, Inc.
    > + *
    > + * Description:
    > + * This driver is developed for SDFEC16 IP. It provides a char device
    > + * in sysfs and supports file operations like open(), close() and ioctl().
    > + */
    > +#ifndef __XILINX_SDFEC_H__
    > +#define __XILINX_SDFEC_H__
    > +
    > +/**
    > + * enum xsdfec_state - State.
    > + * @XSDFEC_INIT: Driver is initialized.
    > + * @XSDFEC_STARTED: Driver is started.
    > + * @XSDFEC_STOPPED: Driver is stopped.
    > + * @XSDFEC_NEEDS_RESET: Driver needs to be reset.
    > + * @XSDFEC_PL_RECONFIGURE: Programmable Logic needs to be recofigured.
    > + *
    > + * This enum is used to indicate the state of the driver.
    > + */
    > +enum xsdfec_state {
    > + XSDFEC_INIT = 0,
    > + XSDFEC_STARTED,
    > + XSDFEC_STOPPED,
    > + XSDFEC_NEEDS_RESET,
    > + XSDFEC_PL_RECONFIGURE,
    > +};
    > +
    > +/**
    > + * struct xsdfec_config - Configuration of SD-FEC core.
    > + * @fec_id: ID of SD-FEC instance. ID is limited to the number of active
    > + * SD-FEC's in the FPGA and is related to the driver instance
    > + * Minor number.
    > + */
    > +struct xsdfec_config {
    > + s32 fec_id;

    What is this structure for and why are you telling userspace about it?
    If you are telling userspace about it, you are using the wrong data
    type :(

    thanks,

    greg k-h

    \
     
     \ /
      Last update: 2019-04-25 22:27    [W:2.927 / U:0.936 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site