Commit f25c20b0 authored by Alessandro Rubini's avatar Alessandro Rubini

general: remove or reword FIXME comments

Some of them don't apply any more (we made our choices, or the problem
has been addressed and fixed elsewhere). Some do but I reworded them.
Some still apply unchanged, and are not touched by this patch.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 9b18e1ca
......@@ -271,7 +271,6 @@ static int __init zbk_init(void)
static void __exit zbk_exit(void)
{
zio_unregister_buf(&zbk_buffer);
/* FIXME REMOVE all instances left */
}
/* This is the default buffer, and is part of zio-core: no module init/exit */
......
......@@ -35,9 +35,6 @@ struct zio_buffer_type {
/* default attributes for instance */
struct zio_attribute_set zattr_set;
/* FIXME: how "own" devices are listed (here or elsewhere?) */
struct zio_device *zdev_owner;
unsigned int n_zdev_owner;
};
#define to_zio_buf(ptr) container_of(ptr, struct zio_buffer_type, head.kobj)
......
......@@ -91,8 +91,6 @@ extern const char zio_zdev_attr_names[ZATTR_STD_NUM_ZDEV][ZIO_NAME_LEN];
extern const char zio_trig_attr_names[ZATTR_STD_NUM_TRIG][ZIO_NAME_LEN];
extern const char zio_zbuf_attr_names[ZATTR_STD_NUM_ZBUF][ZIO_NAME_LEN];
/* FIXME: check this DECLARE stuff */
#define DEFINE_ZATTR_STD(_type, _name) struct zio_attribute \
_name[ZATTR_STD_NUM_##_type]
......
......@@ -21,10 +21,6 @@ struct zio_trigger_type {
/* default attributes for instance */
struct zio_attribute_set zattr_set;
/* FIXME: how "own" devices are listed (here or elsewhere?) */
struct zio_device *zdev_owner;
unsigned int n_zdev_owner;
};
#define to_zio_trig(ptr) container_of(ptr, struct zio_trigger_type, head.kobj)
......
......@@ -77,7 +77,6 @@ static void ztt_fn(unsigned long arg)
/* When a trigger fires, we must prepare our control and timestamp */
getnstimeofday(&ti->tstamp);
/* FIXME: where is the jiffi count placed? */
ztt_instance = to_ztt_instance(ti);
zio_fire_trigger(ti);
......
......@@ -90,12 +90,8 @@ static inline void zio_device_put(dev_t devt)
{
struct zio_channel *chan;
/*
* FIXME there is a little concurrency; to resolve this, get the owner
* from device list by searching by minor
*/
chan = __zio_minor_to_chan(devt);
/* it is impossbile chan = NULL because __zio_device_get() found it */
/* chan can't be NULL because __zio_device_get() found it */
module_put(chan->cset->zdev->owner);
}
......@@ -138,7 +134,6 @@ static int zio_f_open(struct inode *ino, struct file *f)
priv->type = ZIO_CDEV_CTRL;
f->private_data = priv;
/* replace zio fops with buffer fops (FIXME: make it a lib function */
mutex_lock(&zmutex);
old_fops = f->f_op;
new_fops = fops_get(zbuf->f_op);
......@@ -378,10 +373,8 @@ ssize_t zio_generic_read(struct file *f, char __user *ubuf,
if (priv->type == ZIO_CDEV_CTRL && count < ZIO_CONTROL_SIZE)
return -EINVAL;
if ((bi->flags & ZIO_DIR) == ZIO_DIR_OUTPUT) {
/* FIXME: read_control for output channels is missing */
if ((bi->flags & ZIO_DIR) == ZIO_DIR_OUTPUT)
return -EINVAL;
}
if (!__zio_read_allowed(priv)) {
if (f->f_flags & O_NONBLOCK)
......@@ -428,10 +421,8 @@ ssize_t zio_generic_write(struct file *f, const char __user *ubuf,
pr_debug("%s:%d type %s\n", __func__, __LINE__,
priv->type == ZIO_CDEV_CTRL ? "ctrl" : "data");
if ((bi->flags & ZIO_DIR) == ZIO_DIR_INPUT) {
/* FIXME: write_control for input channels is missing */
if ((bi->flags & ZIO_DIR) == ZIO_DIR_INPUT)
return -EINVAL;
}
if (!__zio_write_allowed(priv)) {
if (f->f_flags & O_NONBLOCK)
......
......@@ -479,7 +479,6 @@ static int zio_change_current_trigger(struct zio_cset *cset, char *name)
struct zio_ti *ti, *ti_old = cset->ti;
int err;
/* FIXME I can change the trigger? check it! */
/* FIXME get all necessary spinlock */
pr_debug("%s\n", __func__);
if (strlen(name) > ZIO_OBJ_NAME_LEN)
......@@ -529,7 +528,6 @@ static int zio_change_current_buffer(struct zio_cset *cset, char *name)
struct zio_bi **bi_vector;
int i, j, err;
/* FIXME I can change the buffer? check it! */
pr_debug("%s\n", __func__);
if (strlen(name) > ZIO_OBJ_NAME_LEN)
return -EINVAL; /* name too long */
......@@ -1057,7 +1055,7 @@ static int __bi_register(struct zio_buffer_type *zbuf,
spin_unlock(&zbuf->lock);
bi->cset = chan->cset;
chan->bi = bi;
/* Done. This cset->bi marks everything is running (FIXME?) */
/* Done. This chan->bi marks everything is running (FIXME: audit) */
mb();
bi->chan = chan;
......@@ -1154,7 +1152,7 @@ static int __ti_register(struct zio_trigger_type *trig, struct zio_cset *cset,
list_add(&ti->list, &trig->list);
spin_unlock(&trig->lock);
cset->ti = ti;
/* Done. This cset->ti marks everything is running (FIXME?) */
/* Done. This cset->ti marks everything is running (FIXME: audit) */
mb();
ti->cset = cset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment