Displaying 20 results from an estimated 43 matches for "single_open".
2014 Jun 13
1
dahdi-linux 2.6.2 failing to compile with linux 3.13
...No CONFIG_BKL is an experimental configuration."
^
/usr/src/dahdi-linux-2.6.2/drivers/dahdi/dahdi-base.c: In function
?dahdi_proc_open?:
/usr/src/dahdi-linux-2.6.2/drivers/dahdi/dahdi-base.c:902:2: error:
implicit declaration of function ?PDE?
[-Werror=implicit-function-declaration]
return single_open(file, dahdi_seq_show, PDE(inode)->data);
^
/usr/src/dahdi-linux-2.6.2/drivers/dahdi/dahdi-base.c:902:53: error:
invalid type argument of ?->? (have ?int?)
return single_open(file, dahdi_seq_show, PDE(inode)->data);
^
/usr/src/dahdi-l...
2019 Sep 04
1
[PATCH] drm/nouveau: add missing single_release()
When using single_open() for opening, single_release() should be
used, otherwise there is a memory leak.
This is detected by Coccinelle semantic patch.
Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs")
Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...time_hypercall();
+ seq_printf(m, "Hypercall cycle count: %lld\n", hypercall_cycles);
+ time_page_fault();
+ seq_printf(m, "Kernel #PF cycle count: %lld\n", page_fault_cycles);
+
+ return 0;
+}
+
+static int proc_vmi_info_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, proc_vmi_info_show, NULL);
+}
+
+static struct file_operations proc_vmi_info_operations = {
+ .open = proc_vmi_info_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+#define VDEF(call) #call ,
+static char *vmi_call_name[] = {
+ VMI_CALLS
+};
+#undef V...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...time_hypercall();
+ seq_printf(m, "Hypercall cycle count: %lld\n", hypercall_cycles);
+ time_page_fault();
+ seq_printf(m, "Kernel #PF cycle count: %lld\n", page_fault_cycles);
+
+ return 0;
+}
+
+static int proc_vmi_info_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, proc_vmi_info_show, NULL);
+}
+
+static struct file_operations proc_vmi_info_operations = {
+ .open = proc_vmi_info_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+#define VDEF(call) #call ,
+static char *vmi_call_name[] = {
+ VMI_CALLS
+};
+#undef V...
2013 Sep 05
0
[PATCH RESEND v3 3/7] Intel MIC Host Driver, card OS state management.
...;state) {
+ case MIC_ONLINE:
+ /* Fall through */
+ case MIC_SHUTTING_DOWN:
+ seq_write(s, kva, size);
+ break;
+ default:
+ break;
+ }
+ mutex_unlock(&mdev->mic_mutex);
+ kfree(kva);
+done:
+ return 0;
+}
+
+static int mic_log_buf_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, mic_log_buf_show, inode->i_private);
+}
+
+static int mic_log_buf_release(struct inode *inode, struct file *file)
+{
+ return single_release(inode, file);
+}
+
+static const struct file_operations log_buf_ops = {
+ .owner = THIS_MODULE,
+ .open = mic_log_buf_open,
+ .read = seq_rea...
2016 Mar 21
0
[PATCH v2 22/22] debugfs: add boost interface to change the boost_mode
...ret = kstrtou8(buf, 10, &value);
+ if (ret)
+ return ret;
+
+ args.mode = value;
+ ret = nvif_mthd(ctrl, NVIF_CONTROL_BOOST_SET, &args, sizeof(args));
+ if (ret)
+ return ret;
+
+ return len;
+}
+
+static int
+nouveau_debugfs_boost_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, nouveau_debugfs_boost_get, inode->i_private);
+}
+
+static const struct file_operations nouveau_boost_fops = {
+ .owner = THIS_MODULE,
+ .open = nouveau_debugfs_boost_open,
+ .read = seq_read,
+ .write = nouveau_debugfs_boost_set,
+};
+
static struct drm_info_list nouveau_debugfs_list[] =...
2019 Sep 05
0
[PATCH] drm/nouveau: add missing single_release()
Reviewed-by: Karol Herbst <kherbst at redhat.com>
On Thu, Sep 5, 2019 at 9:14 AM Wei Yongjun <weiyongjun1 at huawei.com> wrote:
>
> When using single_open() for opening, single_release() should be
> used, otherwise there is a memory leak.
>
> This is detected by Coccinelle semantic patch.
>
> Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs")
> Signed-off-by: Wei Yongjun <w...
2020 Jul 21
0
[PATCH -next] drm/nouveau/kms/nvd9-: Fix file release memory leak
Reviewed-by: Lyude Paul <lyude at redhat.com>
Thanks!
On Tue, 2020-07-21 at 15:17 +0000, Wei Yongjun wrote:
> When using single_open() for opening, single_release() should be
> used instead of seq_release(), otherwise there is a memory leak.
>
> Fixes: 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support")
> Reported-by: Hulk Robot <hulkci at huawei.com>
> Signed-off-by: Wei Yongjun <weiyongju...
2018 Aug 28
0
[PATCH v2 3/4] drm/dp_mst: Add dp_mst_status debugfs node for all drivers
...tic int drm_dp_mst_debugfs_state_show(struct seq_file *m, void *data)
+{
+ drm_dp_mst_dump_topology(m, m->private);
+ return 0;
+}
+
+static int drm_dp_mst_debugfs_state_open(struct inode *inode,
+ struct file *file)
+{
+ struct drm_dp_mst_topology_mgr *mgr = inode->i_private;
+
+ return single_open(file, drm_dp_mst_debugfs_state_show, mgr);
+}
+
+static const struct file_operations drm_dp_mst_debugfs_state_fops = {
+ .owner = THIS_MODULE,
+ .open = drm_dp_mst_debugfs_state_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+struct drm_dp_mst_debugfs_init_data...
2013 Jul 25
0
[PATCH 1/5] Intel MIC Host Driver for X100 family.
...->state) {
+ case MIC_ONLINE:
+ /* Fall through */
+ case MIC_SHUTTING_DOWN:
+ seq_write(s, kva, size);
+ break;
+ default:
+ break;
+ }
+ mutex_unlock(&mdev->mic_mutex);
+ kfree(kva);
+done:
+ return 0;
+}
+
+static int log_buf_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, log_buf_seq_show, inode->i_private);
+}
+
+static int log_buf_release(struct inode *inode, struct file *file)
+{
+ return single_release(inode, file);
+}
+
+static const struct file_operations log_buf_ops = {
+ .owner = THIS_MODULE,
+ .open = log_buf_open,
+ .read = seq_read,
+ .ll...
2015 Nov 09
5
[PATCH v2 0/5] move pstate interface to debugfs
I made a little changes in this series:
1. merge the two last patches together
2. unify the private data interface with the drm debugfs one
now it should be very obvious for a new dev on how to add new files to debugfs
and how to get access to the nouveau structs
Karol Herbst (5):
debugfs: add infrastructure to add files with other fops than only
read
debugfs: rename functions to
2018 Aug 28
4
[PATCH v2 0/4] drm/dp_mst: Add DP MST debugfs nodes for all drivers
This is the next version of my patch series for teaching DRM how to
automatically create debugfs nodes for drivers with MST topologies. This
was originally intended just for nouveau, but has since been expanded to
all DRM drivers.
Changes since previous version:
- Fix documentation error that got noticed by the kbuild bot in
"drm/dp_mst: Pass entire connector to
2013 Jul 25
16
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
An Intel MIC X100 device is a PCIe form factor add-in coprocessor
card based on the Intel Many Integrated Core (MIC) architecture
that runs a Linux OS. It is a PCIe endpoint in a platform and therefore
implements the three required standard address spaces i.e. configuration,
memory and I/O. The host OS loads a device driver as is typical for
PCIe devices. The card itself runs a bootstrap after
2013 Jul 25
16
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
An Intel MIC X100 device is a PCIe form factor add-in coprocessor
card based on the Intel Many Integrated Core (MIC) architecture
that runs a Linux OS. It is a PCIe endpoint in a platform and therefore
implements the three required standard address spaces i.e. configuration,
memory and I/O. The host OS loads a device driver as is typical for
PCIe devices. The card itself runs a bootstrap after
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v2 => v3:
a) Patch 1 data structure cleanups, header file include cleanups,
IDA interface reuse and switching to device_create_with_groups(..)
as per feedback from Greg Kroah-Hartman.
b) Patch 7 signal documentation, sleep workaround removal and sysfs
access API cleanups as per feedback from Michael S. Tsirkin.
v1 => v2: @ http://lwn.net/Articles/563131/
a)
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v2 => v3:
a) Patch 1 data structure cleanups, header file include cleanups,
IDA interface reuse and switching to device_create_with_groups(..)
as per feedback from Greg Kroah-Hartman.
b) Patch 7 signal documentation, sleep workaround removal and sysfs
access API cleanups as per feedback from Michael S. Tsirkin.
v1 => v2: @ http://lwn.net/Articles/563131/
a)
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...ControllerProcEntry;
}
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 027b876370bc..429ebb84b592 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -159,14 +159,14 @@ static int aoe_debugfs_open(struct inode *inode, struct file *file)
return single_open(file, aoedisk_debugfs_show, inode->i_private);
}
-static DEVICE_ATTR(state, S_IRUGO, aoedisk_show_state, NULL);
-static DEVICE_ATTR(mac, S_IRUGO, aoedisk_show_mac, NULL);
-static DEVICE_ATTR(netif, S_IRUGO, aoedisk_show_netif, NULL);
+static DEVICE_ATTR(state, 0444, aoedisk_show_state, NULL);...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...ControllerProcEntry;
}
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 027b876370bc..429ebb84b592 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -159,14 +159,14 @@ static int aoe_debugfs_open(struct inode *inode, struct file *file)
return single_open(file, aoedisk_debugfs_show, inode->i_private);
}
-static DEVICE_ATTR(state, S_IRUGO, aoedisk_show_state, NULL);
-static DEVICE_ATTR(mac, S_IRUGO, aoedisk_show_mac, NULL);
-static DEVICE_ATTR(netif, S_IRUGO, aoedisk_show_netif, NULL);
+static DEVICE_ATTR(state, 0444, aoedisk_show_state, NULL);...
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v2 => v3:
a) Patch 1 data structure cleanups, header file include cleanups,
IDA interface reuse and switching to device_create_with_groups(..)
as per feedback from Greg Kroah-Hartman.
b) Patch 7 signal documentation, sleep workaround removal and sysfs
access API cleanups as per feedback from Michael S. Tsirkin.
v1 => v2: @ http://lwn.net/Articles/563131/
a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v2 => v3:
a) Patch 1 data structure cleanups, header file include cleanups,
IDA interface reuse and switching to device_create_with_groups(..)
as per feedback from Greg Kroah-Hartman.
b) Patch 7 signal documentation, sleep workaround removal and sysfs
access API cleanups as per feedback from Michael S. Tsirkin.
v1 => v2: @ http://lwn.net/Articles/563131/
a)