hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/bsr.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* IBM POWER Barrier Synchronization Register Driver
23 *
34 * Copyright IBM Corporation 2008
45 *
56 * Author: Sonny Rao <sonnyrao@us.ibm.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
207 */
218
229 #include <linux/kernel.h>
....@@ -30,7 +17,6 @@
3017 #include <linux/list.h>
3118 #include <linux/mm.h>
3219 #include <linux/slab.h>
33
-#include <asm/pgtable.h>
3420 #include <asm/io.h>
3521
3622 /*
....@@ -147,7 +133,7 @@
147133 return 0;
148134 }
149135
150
-static int bsr_open(struct inode * inode, struct file * filp)
136
+static int bsr_open(struct inode *inode, struct file *filp)
151137 {
152138 struct cdev *cdev = inode->i_cdev;
153139 struct bsr_dev *dev = container_of(cdev, struct bsr_dev, bsr_cdev);
....@@ -322,7 +308,8 @@
322308 goto out_err_2;
323309 }
324310
325
- if ((ret = bsr_create_devs(np)) < 0) {
311
+ ret = bsr_create_devs(np);
312
+ if (ret < 0) {
326313 np = NULL;
327314 goto out_err_3;
328315 }