tree: Run clang-format to conform to the kernel coding style
The coding style has been a bit erratic. Enforce the linux kernel coding style by reusing their .clang-format file, running clang-format on the source, and ignoring the few shortcomings that clang-format has at the moment (especially on aligning the define values). Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
This commit is contained in:
+10
-6
@@ -22,9 +22,9 @@
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
@@ -40,7 +40,8 @@ int media_request_alloc(int media_fd)
|
||||
|
||||
rc = ioctl(media_fd, MEDIA_IOC_REQUEST_ALLOC, &request_alloc);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to allocate media request: %s\n", strerror(errno));
|
||||
sunxi_cedrus_log("Unable to allocate media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -53,7 +54,8 @@ int media_request_reinit(int request_fd)
|
||||
|
||||
rc = ioctl(request_fd, MEDIA_REQUEST_IOC_REINIT, NULL);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to reinit media request: %s\n", strerror(errno));
|
||||
sunxi_cedrus_log("Unable to reinit media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -66,7 +68,8 @@ int media_request_queue(int request_fd)
|
||||
|
||||
rc = ioctl(request_fd, MEDIA_REQUEST_IOC_QUEUE, NULL);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to queue media request: %s\n", strerror(errno));
|
||||
sunxi_cedrus_log("Unable to queue media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -76,7 +79,7 @@ int media_request_queue(int request_fd)
|
||||
int media_request_wait_completion(int request_fd)
|
||||
{
|
||||
struct timeval tv = { 0, 300000 };
|
||||
fd_set except_fds;
|
||||
fd_set except_fds;
|
||||
int rc;
|
||||
|
||||
FD_ZERO(&except_fds);
|
||||
@@ -87,7 +90,8 @@ int media_request_wait_completion(int request_fd)
|
||||
sunxi_cedrus_log("Timeout when waiting for media request\n");
|
||||
return -1;
|
||||
} else if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to select media request: %s\n", strerror(errno));
|
||||
sunxi_cedrus_log("Unable to select media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user